Sample Header Ad - 728x90

Are /dev/i2c-1 and /dev/mem colliding?

0 votes
0 answers
125 views
I write a program which should handle a motion sensor and an ultrasonic sensor at the same time. I'm using a Jetson Nano with 40 GPIO-pins. The first one uses I2C interface and thus accesses /dev/i2c-1 with the linux-intern libi2c-library while the other uses /dev/mem to write hex values directly to the pins. Now when I run them separately, they work just fine, but when trying to combine them in one single code file, they crash. The I2C-sensor just gives an unknown error and freezes. I wanted to ask whether it is possible that they collide when used simultaneously and you have any suggestion how to avoid this? Is there a way to run an I2C-sensor and an ultrasonic sensor in parallel? Thanks for the answers in advance!
Asked by Totemi1324 (131 rep)
Sep 16, 2020, 02:01 PM