add 'node' code base | fix well

This commit is contained in:
Adrien Marquès 2018-12-01 18:38:00 +01:00
parent 2a7311e10f
commit e3a3562177
4 changed files with 30 additions and 0 deletions

1
node/main/libraries Symbolic link
View File

@ -0,0 +1 @@
../../libraries

27
node/main/main.ino Normal file
View File

@ -0,0 +1,27 @@
#include <Wire.h>
#include <XBee.h>
#include "protocol.h"
#include <LiquidCrystal_I2C.h>
// 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() {}

1
node/main/protocol.h Symbolic link
View File

@ -0,0 +1 @@
../../protocol.h

View File

@ -3,6 +3,7 @@
#include "protocol.h"
#include <LiquidCrystal_I2C.h>
#define WAVE_TIMEOUT 5000
// Peripherals
LiquidCrystal_I2C screen(0x27, 16, 2);