![]() | arduino-bare-metal-blinkArduino blink example without IDE or additional libraries |
| Mode | Name | Size |
| -rw-r--r-- | Makefile | 17L |
| -rw-r--r-- | README.md | 32L |
| -rw-r--r-- | main.c | 16L |
Very simple program to blink the built-in led of an arduino (UNO/Nano, not
tested with other boards) without using any external libraries, only one C file
main.c
avr-gcc and avr-libc to compile the codeavrdude for uploading the program to the microcontrollerHaving the dependencies installed, compile the code running make or:
$ make compile
Then with the board connected to the computer, check the port with:
$ ls /dev/tty*
Often appears as /dev/ttyUSB* or /dev/ttyACM*, however it appears it should
match the ARDUINO_PORT variable on Makefile. Finally upload the code to the
arduino with
$ make upload