- Download the Arduino IDE here.
- Download the CHP341 USB to Serial driver (you may need to restart after installing):
- Open your Arduino IDE, change the board type to
Arduino Nano w/ ATmega328
and connect to the correct serial port, as seen below:
Windows Users: The serial port will be something like COM3
or COM4
(the COM stands for 'communications').
Note: Make sure to plug in your board, otherwise the serial port will not show up. Also, if it still doesn't show up try restarting your computer.
-
After opening the Arduino IDE, make sure to add the following two functions to your code, as both are required for the Arduino language:
void setup() { // setup pin outputs and inputs here } void loop() { // code that always runs in a loop here (like your main() function) }
-
Look at some of the example code in this repo to see how to get started. Try downloading one of the files to your computer, and then to your Arduino Nano.
With the release of Mac OS X Yosemite, the old CHP341 driver breaks. This has something to do with the driver signing policies that need to fixed by the CHP341 creators. The official temporary fix for this while WCH updates their software is the following:
-
Reinstall the old CHP341 driver, restart machine (even if it was already installed)
-
Open your terminal and run the follow command:
sudo nvram boot-args="kext-dev-mode=1"
-
Enter your password when prompted (because of the
sudo
command) and then restart your computer.
Note that this is entering developer mode for this device and is only a temporary fix. To restore your Mac to before (AKA, to exit developer mode), run the following in the terminal:
sudo nvram -d boot-args
Both the led_crawler and the binary_counter example projects require a hardware setup as follows:
- Arduino Language Reference
- Arduino Playground - examples of code and interfacing with Hardware
- Fritzing - used to make clean wiring diagrams