/arduinoSerialTest/SensorInput.h

https://bitbucket.org/jat45/ami · C Header · 14 lines · 9 code · 3 blank · 2 comment · 0 complexity · ab94e078e4571079074484fb09e2abc6 MD5 · raw file

  1. #ifndef SENSOR_INPUT_H
  2. #define SENSOR_INPUT_H
  3. // character used to seperate fields in formatted sensor reading strings
  4. #define STRING_SEP_CHAR ':'
  5. // struct for handling strings from sensor readings in a sensible manner
  6. struct SensorInput {
  7. char busType[1]; // (A)nalog, (D)igital, (I)2C
  8. int deviceNumber; // A/D: pin number, I: I2C device address
  9. int registerNumber; // A/D: which device on the pin (only relevant if we've shift registers/mux/etc, 0 if just one device), I: register
  10. };
  11. #endif