-
Notifications
You must be signed in to change notification settings - Fork 1
/
robopro-ftduino.ino
38 lines (35 loc) · 1.03 KB
/
robopro-ftduino.ino
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*
* ROBO Pro für den ftDuino v1.0
* Parser für das fish.X1-Protokoll des TX Controllers
* (TX Firmware 1.30)
*
* Einschränkungen:
* - Ultraschall-Abstandssensor nicht unterstützt
* - keine BT-Unterstützung (work in progress)
* - keine Synchronisation von Motoren
* - keine Kaskadierung von ftDuinos ("Extensions") möglich
*
* Bibliotheken:
* - ftduino.h
* - wire.h
*
* Dirk Fox
*
* - 07.09.2022: publication of v1.1 (I2C support, correction of line sensor values)
* - 02.09.2022: publication of v1.0
* - 27.07.2022: Fork of fx1sample 0.3 by ft-ninja
*/
#include <Ftduino.h>
#include <Wire.h>
#include "fishx1.h"
void setup()
{
Serial.begin(TX_BAUD); // ROBO TX Controller Serial UART (38400,8,n,1)
ftduino.init(); // initialize ftDuino API
Wire.begin(); // initialize I2C driver, join I2C bus as master (controller)
}
void loop()
{
if (Serial.available() > 0) // check UART and read one symbol
fx1Parse(Serial.read()); // parse Fish.X1 protocol
}