digitalRead() is not able to recongnise any input


#1

I’m trying to use the digitalRead() function from the “boltiot” library in python.
I tried using a digital pin but it does not recognise the change in input if any.
I also tried using the A0 pin but I get the following error:
{“value”: “Invalid pin value”, “success”: “0”}

Please Help Thank you


#2

Hi @16bce034,

Could you share your code snippet here. Also reinstall the Bolt Python Library and install again.
Type below command to uninstall the bolton python library.

sudo pip uninstall boltiot

and then install it again.

sudo pip install boltiot


#3

The Output is as follows:
{“value”: “Invalid pin value”, “success”: “0”}

The code is as follows:

import conf # the file conf.py contains all the api keys for my twilio, twiiter, mailgun and Bolt
mb=conf.mybolt
response=mb.digitalRead(‘0’)
print(response)

Also after reinstalling the boltiot library the problem was solved thank you .


#4

Try to use it as digitalWrite()