adafruit / Wippersnapper_Protobuf

Protocol buffer messages for Adafruit.io WipperSnapper Beta
MIT License
0 stars 2 forks source link

Analog Input #38

Closed brentru closed 3 years ago

brentru commented 3 years ago

Added new ConfigurePinRequest field, aref, specifies the reference voltage for analog input. @lorennorman The broker will fill this w/ a value of 3.3 (3.3 volts) by default. In the future, we'll open it up so users can select different reference voltage values on IO Web.

float aref = 7; /** Specifies the reference voltage used for analog input, defaults to 3.3v. */

Added new pinEvent field, pin_voltage to hold an analog pin's voltage reading (calculated by the device) float pin_voltage = 4; /** Optional, specifies an anlog pin's voltage. */

Added some deprecated tags to messages to keep track of what we're not using

Addresses: https://github.com/adafruit/Wippersnapper_Protobuf/issues/36

brentru commented 3 years ago

Added AnalogReadMode to ConfigurePinRequest: Either ANALOG_READ_MODE_PIN_VALUE or ANALOG_READ_MODE_PIN_VOLTAGE. This should be a selectable option on the modal. Configures the client to return a raw ADC value or voltage.

brentru commented 3 years ago

I'm going to add to the TODO for analog input to further clarify the voltage stuff