Open anthonysteel opened 4 years ago
For example, in the CMakeLists.txt file there is the following:
generate_arduino_firmware(server
SKETCH server.cpp
PORT /dev/ttyS9
SERIAL picocom @SERIAL_PORT@
BOARD mega2560)
generate_arduino_firmware(client
SKETCH client.cpp
PORT /dev/ttyS9
SERIAL picocom @SERIAL_PORT@
BOARD mega2560
which generates two executables, client and server. It would be better if port was specified at build time. Something like:
cmake --send-port /dev/ttyS8 --receive-port /dev/ttyS9 ..
CMake should have support for this kind of thing, or it can be set as an environment variable which CMake captures.
Right now the ports that the Arduinos are connected on are hard coded in the CMakeLists and in
send.py
/receive.py
. Change these to accept the port as an input for easier development across machines.