I have been reading this as "gertboard" and potentiometer feedback.
Only now do I see it is gertbot and potentiometer feedback.
To use a potentiometer and gertbot
do the following:
You set up one of the gertbot pins in ADC mode and then read the value back.
Most people seem to use the board with python.
This is code which reads back all four ADC pins each five times:
Code: Select all
board = 0
for i in range(13,17) :
print("Five times ADC's read from BOARD0 !!!\n")
for i in range (0,5) :
print("ADC0 : %6.3f\n" % gb.read_adc(board,0))
print("ADC1 : %6.3f\n" % gb.read_adc(board,1))
print("ADC2 : %6.3f\n" % gb.read_adc(board,2))
print("ADC3 : %6.3f\n" % gb.read_adc(board,3))
you need to read the value and then use the value read to send a command
to control one of the many parameters of the board.
e.g. you can read a potentiometer and then control the speed & direction of a motor.