39 bool pingSuccess = pcf8591.
ping();
40 pwOut <<
"PCF8591 ping = " << pingSuccess <<
'\n';
43 uint8_t value = pcf8591.
read_channel(PropWare::PCF8591::CHANNEL_0);
45 pwOut <<
"PCF: " << value <<
'\n';
46 waitcnt(250 * MILLISECOND + CNT);
47 value = pcf8591.
read_channel(PropWare::PCF8591::CHANNEL_0);
A simple 4-channel, 8-bit ADC and single-channel 8-bit DAC both integrated into one chip...
const PropWare::Printer pwOut
Most common use of printing in PropWare applications (not thread safe; see PropWare::pwSyncOut for mu...
bool ping() const
Ensure the device is responding on the I2C bus.
uint8_t read_channel(const ADCChannel channel)
Read the ADC value from a given channel.