diff --git a/node/main/libraries b/node/main/libraries new file mode 120000 index 0000000..195d8f0 --- /dev/null +++ b/node/main/libraries @@ -0,0 +1 @@ +../../libraries \ No newline at end of file diff --git a/node/main/main.ino b/node/main/main.ino new file mode 100644 index 0000000..de26f10 --- /dev/null +++ b/node/main/main.ino @@ -0,0 +1,27 @@ +#include +#include +#include "protocol.h" +#include + +// Peripherals +LiquidCrystal_I2C screen(0x27, 16, 2); +XBee xbee = XBee(); + +// ACTUAL DATA +uint8_t wave_id = 255; // last wave +uint8_t dist = 255; // actual distance +struct discover dsc = {0,0,0}; +struct message msg = {1, dist, 0, 0, {}}; + +void setup() { + Serial.begin(38400); + Serial.println("+ ready"); + + screen.begin(); + screen.backlight(); + + xbee.setSerial(Serial1); + Serial1.begin(38400); +} + +void loop() {} diff --git a/node/main/protocol.h b/node/main/protocol.h new file mode 120000 index 0000000..c9b722e --- /dev/null +++ b/node/main/protocol.h @@ -0,0 +1 @@ +../../protocol.h \ No newline at end of file diff --git a/well/main/main.ino b/well/main/main.ino index 43e5918..6047087 100644 --- a/well/main/main.ino +++ b/well/main/main.ino @@ -3,6 +3,7 @@ #include "protocol.h" #include +#define WAVE_TIMEOUT 5000 // Peripherals LiquidCrystal_I2C screen(0x27, 16, 2);