Issues with running ROS Indigo and using the pigpio I2C library [closed]

asked 2016-05-29 13:55:02 -0600

aland_t gravatar image

updated 2016-05-29 14:09:41 -0600

I am running ROS Indigo on a Raspberry Pi 2 with Raspbian Jessie. I need to use PWM to control some motors and I2C to communicate with a fuel gauge. I am utilizing the pigpio library, since I can start the pigpio daemon with sudo and not have to worry about needing root access to use GPIO pins.

I wrote individual scripts to perform these functions, and they both produce the expected output. When I call the functions inside ROS, the PWM works fine, but the I2C comms fail.

If I remove the I2C code from the ROS node, and run the test script, I get the expected output until I start ROS. Even after killing ROS, the I2C comms do not return to normal. Any ideas?

Never mind. The pinout diagram I was looking at for the Pi 2 had a mistake. I'm using pin 13 on the Pi as an alert signal from the fuel gauge. This is GPIO 27, but the diagram said it was GPIO 2 which is actually the SDA line for I2C. So, when I set GPIO 2 as an input I killed I2C. I am now using the correct pin number, and everything works as expected.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by mgruhler
close date 2019-12-04 03:56:10.503797

Comments

Suggestion: post your last edit as an answer and accept your own answer. That way it is clear that this question has been answered.

gvdhoorn gravatar image gvdhoorn  ( 2016-05-29 14:45:08 -0600 )edit

I decided to close this, stumbling upon it, as the answer is actually in the question, as pointed out above.

mgruhler gravatar image mgruhler  ( 2019-12-04 03:56:42 -0600 )edit