I am using a dissolved oxygen circuit from Atlas Scientific. I connected the device to my Raspberry Pi 3 and ran the command to interact with the device.
The LED on my device is blue which means that it is in i2c mode and it is recognized by the Raspberry Pi.
My problem is that when I try to input a command, I always get the "Query failed" output.
try:
print(device.query(input))
except IOError:
print("Query failed")
def query(self, string):
# write a command to the board, wait the correct timeout, and read the response
self.write(string)
def write(self, cmd):
# appends the null character and sends the string over I2C
cmd += "\00"
self.file_write.write(cmd)
This happens for any command (for example, if I enter "I" I should get the device information, but I end up with the "Quert Failed").
Also, when I try to execute the "Poll" command (which also calls the query method), the program exits on the line self.file_write.write(cmd)
with the following error:
IOError: [Errno 5] Input/output error
Does this mean I can't read or write my i2c device?