bool' object is not callable; perhaps you missed a comma?

111 Views Asked by At

I am trying to run this python code. Can anyone tell me how ho solve this issue?

from pyfirmata import Arduino 
from time import sleep

port = 'COM9'
board=Arduino(port)

pin = board.get_pin('a:0:i')
it = pyfirmata.util.iterator(board)
it.start()

while True():
    analog_value = pin.read()
    # voltage = float(analog_value*(5.0/1023.0))
    print(analog_value )
    # print(voltage)
    sleep(0.1)
    
1

There are 1 best solutions below

2
On
()

Is not needed when writing a while True statement.