This repository contains the example of the device handler for the Arduino managing the temperaure, environmental and accelerometer sensors. It is employed the fsfw with the release 0.01. The code has the obejective of reading the serial data output of the Arduino (in SPC format) and saving them in global data pool. The data will be then exploited by the termal controller.
In order to run the code it is necessary to connect the computer to the Arduino through USB interface. Before building and running the code, the serial port should be open through the terminal.
In my case the name of my port is: /dev/ttyACM0
The command to open the serial port in the terminal is: sudo chmod a+rw /dev/ttyACM0
In conclusion it is firstly necessary to know the name of the computer serial port. This name should be substituted in line 52 of mission/DeviceHandler/ArduinoComIF.cpp as: int serial_port = open("WRITE_SERIAL_PORT_NAME", O_RDWR); Finally the command described here above must be inserted in the terminal.
RMK! ==> Now the port should be just renamed with the correct name in the code, there is no need anymore of write the open command in the terminal.