Programming the Arduino
Before starting, make sure you have downloaded the eChook code and installed Arduino IDE.
Follow this order:
Locate and open the ‘eChookCode.ino’ file downloaded in the previous step. This will open all files in the Arduino IDE.
Set the correct board in the IDE. Go to Tools > Board.
If you are using an Arduino Nano, select Arduino AVR Boards > Arduino Nano, then go to Tools > Processor and select ATmega328*. The bottom right of the Arduino IDE should now read “Arduino Nano, ATmega328”.
If you are using an Arduino Nano Every, go to Boards Manager and search for "megaAVR", then install the megaAVR boards package. Then go to Tools > Boards > megaAVR Boards > Arduino Nano Every.
Compile the code by clicking the "tick" button on the top left of the Arduino IDE window. A progress bar will appear at the bottom of the window - this step will likely take a couple of minutes the first time. When done, the message bar will read "Done Compiling". If you have a problem at this point, take a look at the suggestions at the bottom of this page.
Assuming the code compiled successfully, it can now be uploaded (flashed) to the Arduino. Before plugging the Arduino in, go to "Tools > Port" and take note of which COM ports are listed. Now connect the Arduino via the mini USB cable. The computer will assign it a COM port. Go back to "Tools > Port" and select the new COM port, which will be the Arduino.
If you are using the older Arduino Nano Clone, it is important to disconnect the Bluetooth module from the eChook board before attempting to flash code. This isn't required for the Arduino Nano Every, it can be programmed with everything connected.
Press the ‘Upload’ button to compile and flash the code to the board. The TX and RX lights on the Arduino will flash rapidly while the upload is ongoing. When finished the Arduino IDE will show “Upload Complete” if it has all worked.
Upload Errors
It might not work first time. Don't panic!
Common Errors
Out Of Sync
If an error occurs it will show up in the Output window at the bottom of the IDE. The most common error seen is an out of sync error, which will show something like the following:
There are some common causes for this:
The Bluetooth module is plugged in at the same time as you are trying to program the Arduino. Unplug it and try again. (Does not apply to the Arduino Nano Every)
The wrong COM port is selected - does the port disappear from the Tools > Port menu when you unplug the Arduino?
You have the wrong Arduino or wrong processor selected in the IDE.
Ensure the correct Arduino is selected.
If using an Arduino Nano Clone, go to Tools > Processor and make sure ATmega328P is selected. If the error still appears, try selecting the ATmega328P (Old Bootloader) instead.
You have the wrong version of the CH340 driver installed. Check the driver date and version in device manager matches below. If not, go back to the driver install page for the correct link.

Access is denied
A more recent common error is 'Can't open Device' and will show something like the following:
This happens when the COM port is already open in another process. With Arduino IDE 2.x it seems that this other process is often the IDE itself. If you are seeing this error there doesn't seem to be one fix that works for everyone, but here are a few things to try:
Open Serial Monitor (Square button top right of the IDE), then close it again. This makes the IDE close the serial port if it has it open. Now try to upload the code again.
Unplug the Arduino, close the IDE, re-open the IDE, plug in the Arduino and hit upload the moment Windows recognises it.
Check the driver version - as in point 4 of the out of sync error section above.
A little drastic, but try another computer! This generally works.
Oct 2024 Update: Windows 11 now appears to re-write the CH340G drivers for the Nano Clone boards on start-up, requiring an uninstall and reinstall of the correct drivers each boot. All new kits come with an Arduino Nano Every and will not encounter this issue, but it is certainly annoying for teams with the older Arduino. Any eChook Nano board will work with the newer Arduino Nano Every.
Any other Issues
If you are seeing other issues, or compilation errors rather than upload errors you'll have the errors listed in the console window. Some errors are more helpful than others, but to make them as useful as possible, go into preferences and enable verbose logging:

Now try the upload again - it will still fail, but should give more information on why. Feel free to give google a try, but if you can't make sense of the log, use the chat feature on this page or head over to the support forum and start a new thread with a copy of the errors - we'll give you a hand deciphering it.
Last updated