Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot get i2c readings with USB board #6

Open
borch84 opened this issue May 15, 2020 · 1 comment
Open

Cannot get i2c readings with USB board #6

borch84 opened this issue May 15, 2020 · 1 comment

Comments

@borch84
Copy link

borch84 commented May 15, 2020

Hi, I am trying to get readings from my EC sensor. I have already connected my EC chip to my USB EZO isolated board. The board is detected by my rapsberry pi, but when I send the R command to get a reading I cannot get any return value

`pi@aws-rpi02:~/Raspberry-Pi-sample-code $ sudo python2 ftdi.py

Welcome to the Atlas Scientific Raspberry Pi FTDI Serial example.

Any commands entered are passed to the board via UART except:
Poll,xx.x command continuously polls the board every xx.x seconds
Pressing ctrl-c will stop the polling

Press enter to receive all data in buffer (for continuous mode) 

Discovered FTDI serial numbers:
('\nIndex: ', 0, ' Serial: ', u'DO009HTS')

Please select a device index: 0

('>> Opened device ', u'DO009HTS')

Any commands entered are passed to the board via FTDI:
Enter command: R
Enter command:`

If I run the i2cdectec command I dont see the chip address:

pi@aws-rpi02:~/Raspberry-Pi-sample-code $ sudo i2cdetect -y 1 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- --

However if I connect the EC chip directly to my raspberry pi I can get readings from it:

`pi@aws-rpi02:~ $ sudo i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- 64 -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
pi@aws-rpi02:~ $ cd Raspberry-Pi-sample-code/
pi@aws-rpi02:/Raspberry-Pi-sample-code $ ls
AtlasI2C.py AtlasI2C.pyc ftdi.py i2c.py LICENSE README.md uart.py
pi@aws-rpi02:
/Raspberry-Pi-sample-code $ sudo python2 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

--> EC 100

Enter command: r
Success EC 100: 13090
Enter command: r
Success EC 100: 13090
Enter command: r
Success EC 100: 13090
Enter command: r
Success EC 100: 13090
Enter command: r
Success EC 100: 13090
Enter command: r
Success EC 100: 13010
Enter command: r
Success EC 100: 13010
`

Any input why I cannot get readings using the USB isolated board but I can get readinds from the EC chip connected directly to my RPI?

Thanks.

@Atlas-Scientific
Copy link
Contributor

The USB carrier board works with UART mode, not I2C mode. Set your circuit to UART mode (green LED) when you put it into the USB board.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants