Documente Academic
Documente Profesional
Documente Cultură
CoasterBot Master
Black Dog Robotics
MAKE Coasterbot Challenge
Mar-May 2010
I2C master, sensor input
reads inputs, controls motor speed, etc.
*/
#include <Wire.h>
// conversion between data types
// I2C only sends bytes
union BYTE2INT {
byte asBytes[2];
int asInt;
} byteToInt;
union BYTE2FLOAT {
byte asBytes[2];
int asFloat;
} byteToFloat;
// message buffers
byte msg1[3];
byte msg2[5];