opportunistic-xbee/node/main/main.ino

28 lines
519 B
Arduino
Raw Normal View History

2018-12-01 17:38:00 +00:00
#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() {}