SolenoidReceive performs Wire.requestFrom(slave, 2) and combines high/low bytes MSB first into uint16_t. The DAQ selects the mux channel first when SOLENOID_MUX_CHANNEL is not 0xFF (daqloop.cpp).
- Address:
SOLENOID_I2C_ADDR(default0x09inhwconfig.h).
src/tsesp/main.cpp registers Wire as a slave at I2C_SLAVE_ADDR (0x09):
- On receive (master write): expects 2 bytes; updates
lastI2CValueand may callsetRelays()ifRELAY_MSB_BITis set. - On request (master read): returns the same high / low byte pair.
Teensy reads the state the ESP last applied (LoRa or I2C write). Keep bit semantics aligned with relay bitmap and LoRa payloads.