ADC Brick

The ADC brick contains 16-bit analogue to digital converter with a PGA (ADS1115). The ADC brick has two digital I2C ports (left and right) to comunicate with the I2Bricks and one analogue (4 channel) port (bottom)

Serial Port Commands:
adc0 - return channel 0 of the adc
adc1 - return channel 1 of the adc
adc2 - return channel 2 of the adc
adc3 - return channel 3 of the adc

Python Functions:
adc(port, channel) - return voltage in milivolts of channel (0-3) of the adc.

In [7]:
#Example Python code to test an ADC brick connected to an ARD brick

from I2Brick import *

port = I2Brick('COM4')             #Windows: Initialize the serial communication with I2Bricks
#port = I2Brick('/dev/ttyUSB0')    #Linux: Initialize the serial communication with I2Bricks

print(ard(port))                   #test the communication between ARD and PC
print()

dac(port, 0, 4000)

for i in range(0, 4):
    voltage = (adc(port, i))
    print("Channel %d = %.2f milivolts" %(i ,voltage))

port.close()
I2Brick Firmware 3.0. Supported brick: ARD, OLD, DAC, ADC

Channel 0 = 3980.38 milivolts
Channel 1 = 573.75 milivolts
Channel 2 = 573.00 milivolts
Channel 3 = 572.62 milivolts

YOUR USE OF THIS SITE IS AT YOUR SOLE RISK - Please read LEGAL DISCLAIMER