You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In CircuitPython (2.0.0-beta1.1 but I think it is the same in 1.0.0) RuntimeException is not defined.
The call should just be Exception.
I replaced the 3 occurences of RuntimeException with Exception and it all works fine.
This likely only occurred because I triggered the error condition due to a wiring issue ;-)
It may not have been executed in your testing:
'
#check that the HW id is correct
if self.hw_id != CCS811_HW_ID_CODE:
raise RuntimeException("Device ID returned is not correct! Please check your wiring.")
#try to start the app
buf = bytearray(1)
buf[0] = 0xF4
self.i2c_device.write(buf, end=1, stop=True)
time.sleep(.1)
#make sure there are no errors and we have entered application mode
if self.checkError():
raise RuntimeException("Device returned an Error! Try removing and reapplying power to the device and running the code again.")
if not self.fw_mode:
raise RuntimeException("Device did not enter application mode! If you got here, there may be a problem with the firmware on your sensor.")
`
The text was updated successfully, but these errors were encountered:
In CircuitPython (2.0.0-beta1.1 but I think it is the same in 1.0.0) RuntimeException is not defined.
The call should just be Exception.
I replaced the 3 occurences of RuntimeException with Exception and it all works fine.
This likely only occurred because I triggered the error condition due to a wiring issue ;-)
It may not have been executed in your testing:
'
#check that the HW id is correct
if self.hw_id != CCS811_HW_ID_CODE:
raise RuntimeException("Device ID returned is not correct! Please check your wiring.")
`
The text was updated successfully, but these errors were encountered: