the aim of this module is to send data from/to GODOT <-> Arduino (tested and working on linux platform)
in this demo :
- at the top between < >, data coming from arduino
- at the bottom, integer sent to arduino and controling the intensity of the red LED.
https://www.arduino.cc/en/Guide/Introduction
in this project, the arduino nano is wired with MPU9250/MPU650 module SDA --> A4 and SCL --> A5
https://www.robot-maker.com/shop/capteurs/217-imu-9-axes-mpu9250-6500-spi-217.html
a led is also wired to D3 in order to be controled from godot
to be copied in Godot module folder (godot-3.x.y-stable/modules/arduino_f/)
in file : comments the line (if not, it is a define for using this module in the main file -> see main.cpp)
// #define TEST_arduino_f_module_in_main
and build again with scons in the main directory /godot-3.x.y-stable (x11 for linux)
scons platform='x11' -j4
(to use 4 threads)
code could be used as is with the main.cpp go to the Godot module folder and :
scons -j4
links to CeSerial library (many thanks to the developer Yan Naing Aye)
Godot code to be opened in Godot
open doxyfile with doxygen --> run doxygen --> show HTML output --> enjoy browsing in this beautiful documentation ;)
-
add crc check for the strings transmitted from and to Godot
-
add the possibility to choose in Godot directly the speed of sending message (for the moment every 10 ms)
-
add a second loop to have two channels of sending message in different speed ; for example, fast message every 10 ms and low message every 1000 ms
-
add connectivity via WiFi, Bluetooth