Commit 35c66cc9 authored by Patrick's avatar Patrick

added slave version check

parent e4fb89e2
#include <red_peg.h>
red_peg RP;
void setup() {
RP.begin();
RP.sensorsOn();
delay(100);
Serial.begin(BAUD);
Serial.println("starting rp_version_check");
}
void loop() {
t_SensorData version_info = RP.get(VERSION);
if (version_info.sensor == VERSION) {
Serial.print("RP library version: ");
Serial.print(version_info.major);
Serial.print(".");
Serial.print(version_info.minor);
Serial.print(".");
Serial.print(version_info.patch);
Serial.println();
} else {
Serial.print("no return from red-peg-slave: ");
RP.print_data(version_info);
}
delay(5000);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment