#Nerves, Circuits and I2C troubles

10 messages · Page 1 of 1 (latest)

main token
#

(I'm going to copy my question from https://elixirforum.com/t/elixir-nerves-wrong-i2c/51105 -- hope that's okay!)

Hi! I am very new to all of this but I’m hoping you can help me.

I have an original Raspberry Pi with some sensors attached (GPIO, I2C, SPI). In Raspbian, everything seems to work as intended. I run i2cdetect -y 0 and I see devices at 0x39 and 0x48. I see /dev/i2c-0.

However, I am having trouble exploring with Elixir Circuits Quickstart. If I run Circuits.I2C.bus_names() I get back ["i2c-11"], and Circuits.I2C.detect_devices() just loops i2c-bcm2835 20205000.i2c: i2c transfer timed out.

Any advice?

jagged osprey
#

Are you running an Elixir project in Raspbian or are you actually building and flashing nerves firmware?

main token
#

There's a Python project in Raspbian but the Elixir code is on Nerves firmware (thttps://github.com/elixir-circuits/circuits_quickstart)

#

Just running commands in Interactive

jagged osprey
#

hmmm, not sure, I'm not familiar with this project, I've only ever just created my own nerves projects. what model raspberry pi?

main token
#

Model B I think, so the rpi target

jagged osprey
#

i've only got a rpi0, but I've never had trouble with I2C on it; not sure how much more I can help. I'm suspicious of this "starter project", it's really dead simple to create a nerves project with mix nerves.new, I would try that just to see if it's something wrong with the quickstart project

main token
#

I'll try that when I'm back on my desktop later

So you've not had a problem with Circuits.I2C?

jagged osprey
#

nope, I have working I2C code on an RPI0, works fine