I was following the Bolt-IOT course,Project 8-LED Intensity Control.I made a small change to the code to get different intensities .Here is my code
from boltiot import Bolt
api_key=“XXXXXXXXXXXXXXXXXX”
device_id =“BOLTXXXX”
mybolt=Bolt(api_key,device_id)
intensities=[‘10’,‘20’,‘30’,‘40’]
for i in intensities:
response=mybolt.analogWrite(‘0’,i)
print(response)
Can someone please explain the reason of error and suggest some ways to improve it to prevent such errors