mcmx / open-access-control

Automatically exported from code.google.com/p/open-access-control
0 stars 0 forks source link

Recommend adding instructions for CLI arduino uploading #15

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Right now the instructions encourage using the `arduino` program to burn images 
to the RPi, but with only two USB ports (and assuming no knowledge of X over 
SSH) this is hard. Might be nice to include instructions on burning the 
firmware via the CLI.

Note, these instructions are not yet verified working:

---
from: 
http://www.linuxcircle.com/2013/05/15/programming-and-uploading-arduino-sketch-w
ithout-ide/

---

arduino-mk package makes it simple to build and upload sketches on a Raspberry 
Pi without the bloated Arduino IDE.

Install the package:

sudo apt-get install arduino-mk
This will install all the required software and files.

Create a library area in your user home directory with a demo sketch in it: 
first, download Open_Access_Control_v4_std_136.zip to your home folder.

mkdir ~/sketchbook
cd ~/sketchbook
ln -s /usr/share/arduino/Arduino.mk
mkdir Open_Access_Control_v4_std
cd Open_Access_Control_v4_std
unzip ~/Open_Access_Control_v4_std_136.zip

Create the Makefile:

sudo nano Makefile

BOARD_TAG = uno
ARDUINO_PORT = /dev/ttyUSB0
ARDUINO_LIBS = Wire EEPROM DS1307 Wiegand26 PCATTACH Adafruit_MCP23017 AT24C
ARDUINO_DIR = /usr/share/arduino
include ../Arduino.mk

make

make upload

It will prepare the c and bit files and burn the memory on your Arduino. Watch 
your LED blinks.

Other commands to perform various tasks:

make – no upload
make upload – compile and upload
make clean – remove all our dependencies
make depends – update dependencies
make reset – reset the Arduino by tickling DTR on the serial port
make raw_upload – upload without first resetting
make show_boards – list all the boards defined in boards.txt

Original issue reported on code.google.com by bradley....@gmail.com on 13 Feb 2014 at 7:16