1 # Arduino Bare Metal Blink Example 2 3 Very simple program to blink the built-in led of an arduino (UNO/Nano, not 4 tested with other boards) without using any external libraries, only one C file 5 `main.c` 6 7 ## Dependencies 8 9 * `avr-gcc` and `avr-libc` to compile the code 10 * `avrdude` for uploading the program to the microcontroller 11 12 ## Compile and upload to the board 13 14 Having the dependencies installed, compile the code running `make` or: 15 16 ```console 17 $ make compile 18 ``` 19 20 Then with the board connected to the computer, check the port with: 21 22 ```console 23 $ ls /dev/tty* 24 ``` 25 26 Often appears as `/dev/ttyUSB*` or `/dev/ttyACM*`, however it appears it should 27 match the `ARDUINO_PORT` variable on `Makefile`. Finally upload the code to the 28 arduino with 29 30 ```console 31 $ make upload 32 ```
