The arduino/ directory contains the source files for the Arduino sketch that will be run on the Arduino Mega.
You can compile it by running make in the directory.
NOTE: You will need to use the latest version of Arduino IDE (>1.8.0). The version provided in the Debian/Ubuntu repositories is very old, go download it from the Arduino website instead.
- Set the
ARDUINO_DIRenvironment variable to the location of your Arduino installation e.g./usr/share/arduino. cdto thearduino/directory in this project.- Run
maketo compile the sketch, or runmake uploadto compile and upload the sketch.
The raspi-service.py script will install the necessary systemd unit files to run raspi-uart, raspi-ml and raspi-eval as a service.
Undeterministic things will happen if you run multiple copies of this software at the same time, so when e.g. running the raspi-uart program on the command line, make sure its associated service (raspi-uart.service) has been stopped first.
Clone the git repository into the raspberry pi and run make in the relevant directories to compile the relevant software:
raspi-monitor: A simple program which prints all incoming UART messages to stdout.raspi-uart: The UART communication program that is run on the system.
Run them directly, but you will need to have the necessary dependencies installed first.
raspi-ml.py: Machine learning processraspi-eval.py: Evaluation server communication process.
Located at libraries/ucomm.
The ucomm library is used for UART communication between the Arduino and Raspberry Pi.
It will automatically be compiled and linked against the software (i.e. arduino, raspi-uart) that needs it.
Run make test in the directory to compile and run some tests.
-
Write the Raspbian Image to the Raspberry Pi, i.e.
dd bs=4M if=2017-08-16-raspbian-stretch-lite.img of=/dev/sdX oflag=sync status=progress partprobe /dev/sdX -
Mount the
/bootpartition of the SD card.-
Create an empty
sshfile in the/bootpartition, i.e. (in the mounted/bootpartition directory)sudo touch ssh -
Open
/boot/cmdline.txtand:- Remove the console entry that refers to
serial0, i.e.console=serial0,115200. - Append
net.ifnames=0to the end.
- Remove the console entry that refers to
-
Open
/boot/config.txt, and add the following line to the end of the file:dtoverlay=pi3-disable-bt
-
-
Mount the root partition of the SD card.
-
Open
/etc/dhcpcd.conf, and look for the following similar lines and modify it such that it looks like:# Example static IP configuration: interface eth0 static ip_address=192.168.3.2/24where
192.168.3.2is your desired static IP.There is no need to specify a
routersordomain_name_servers.
-