i tried to change the adress of my peristaltic pumps. I’m able to run the python code in the terminal, but then I’m not able to change the adress. I can only see the device when the pump is connected, before i run the python code.
As you can see in the following lines an “error 2” occurs.
What can I do?
pi@raspberrypi:~ $ ~/Mycodo/env/bin/python ~/Mycodo/mycodo/devices/atlas_scientific_i2c.py
>> Atlas Scientific I2C sample code
>> Any commands entered are passed to the default target device via I2C except:
- Help
brings up this menu
- List
lists the available I2C circuits.
the --> indicates the target device that will receive individual commands
- xxx:[command]
sends the command to the device at I2C address xxx
and sets future communications to that address
Ex: "102:status" will send the command status to address 102
- all:[command]
sends the command to all devices
- Poll[,x.xx]
command continuously polls all devices
the optional argument [,x.xx] lets you set a polling time
where x.xx is greater than the minimum 1.50 second timeout.
by default it will poll every 1.50 seconds
>> Pressing ctrl-c will stop the polling
>> Device at I2C address 80 has been identified as an EZO device and will be queried
>> WARNING: device at I2C address 118 has not been identified as an EZO device and will not be queried
--> module: ?I,PMP,1.04, address: 80, name: ?NAME,
>> Enter command: List_addr
--> module: ?I,PMP,1.04, address: 80, name: ?NAME,
>> Enter command: Address,80
('error', '2')
What a silly mistake. I read your hydroponic guide, but not the information on the terminal carefully.
However I tried to use the proper syntax, but it doesnt work either. Can you please help me what I’m doing wrong?
pi@raspberrypi:~ $ ~/Mycodo/env/bin/python ~/Mycodo/mycodo/devices/atlas_scientific_i2c.py
>> Atlas Scientific I2C sample code
>> Any commands entered are passed to the default target device via I2C except:
- Help
brings up this menu
- List
lists the available I2C circuits.
the --> indicates the target device that will receive individual commands
- xxx:[command]
sends the command to the device at I2C address xxx
and sets future communications to that address
Ex: "102:status" will send the command status to address 102
- all:[command]
sends the command to all devices
- Poll[,x.xx]
command continuously polls all devices
the optional argument [,x.xx] lets you set a polling time
where x.xx is greater than the minimum 1.50 second timeout.
by default it will poll every 1.50 seconds
>> Pressing ctrl-c will stop the polling
>> Device at I2C address 80 has been identified as an EZO device and will be queried
>> Device at I2C address 102 has been identified as an EZO device and will be queried
>> WARNING: device at I2C address 118 has not been identified as an EZO device and will not be queried
--> module: ?I,PMP,1.04, address: 80, name: ?NAME,
- module: ?I,RTD,2.13, address: 102, name: ?NAME,
>> Enter command: List_addr
>> Enter command: 80:I2C,50
('error', OSError(121, 'Remote I/O error'))
>> Enter command:
Edit: I tried it again and it worked.
The Error-message confused me, but it worked.