add 'node' code base | fix well
This commit is contained in:
parent
2a7311e10f
commit
e3a3562177
|
@ -0,0 +1 @@
|
|||
../../libraries
|
|
@ -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() {}
|
|
@ -0,0 +1 @@
|
|||
../../protocol.h
|
|
@ -3,6 +3,7 @@
|
|||
#include "protocol.h"
|
||||
#include <LiquidCrystal_I2C.h>
|
||||
|
||||
#define WAVE_TIMEOUT 5000
|
||||
|
||||
// Peripherals
|
||||
LiquidCrystal_I2C screen(0x27, 16, 2);
|
||||
|
|
Loading…
Reference in New Issue