UART with mainboard works

- the sideboard can now send and receive Serial data from the mainboard
- fixed Processing sketch
This commit is contained in:
EmanuelFeru
2020-03-01 09:42:48 +01:00
parent 0f3bd3f7d9
commit f088bd6a87
14 changed files with 88 additions and 81 deletions

View File

@@ -67,8 +67,8 @@
#define SERIAL_FEEDBACK // [-] Define for Serial Feedback via the serial port
#endif
#define USART_MAIN_BAUD 38400 // [bit/s] MAIN Serial Tx/Rx baud rate
#define SERIAL_START_FRAME 0xAAAA // [-] Start frame definition for reliable serial communication
#define SERIAL_TIMEOUT 300 // [-] Numer of wrong received data for Serial timeout detection
#define SERIAL_START_FRAME 0xABCD // [-] Start frame definition for reliable serial communication
#define SERIAL_TIMEOUT 500 // [-] Numer of wrong received data for Serial timeout detection
/* ==================================== SETTINGS AUX ==================================== */

View File

@@ -134,6 +134,7 @@ typedef enum {READ = 0, WRITE = !READ} i2c_cmd;
/* =========================== Defines MPU-6050 =========================== */
#define log_i printf // redirect the log_i debug function to printf
#define RAD2DEG 57.295779513082323 // RAD2DEG = 180/pi. Example: angle[deg] = angle[rad] * RAD2DEG
#define q30 1073741824 // 1073741824 = 2^30
#define ACCEL_ON (0x01)
#define GYRO_ON (0x02)
#define COMPASS_ON (0x04)