How to use continuous sampling
2614 Views - Created 27/06/2016
bus = i2c_helper.get_smbus()
adc = ADCPi(bus, 0x68, 0x69, 12)
For our C library, you set the 5th parameter in the read_voltage() function to 1.
read_voltage(0x68,1, 12, 1, 1));
You will also need to set the sample bit rate to be 12 bit for it to read at 200Hz.
In python on a Raspberry Pi 3, you should be able to get around 250 samples per second when reading from a single channel in 12-bit mode. Reading from two channels on the same ADC chip, for example, channels 1 and 3 will reduce the sample rate to around 170sps as it takes a short amount of time to change channels.
Note: documents in Portable Document Format (PDF) require Adobe Acrobat Reader 5.0 or higher to view, download Adobe Acrobat Reader or other PDF reading software for your computer or mobile device.