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

write /dev/i2c-1: connection timed out #1087

Open
TuringZhu opened this issue Aug 31, 2024 · 1 comment
Open

write /dev/i2c-1: connection timed out #1087

TuringZhu opened this issue Aug 31, 2024 · 1 comment

Comments

@TuringZhu
Copy link

Hello, I a beginner gobot & raspberry pi.

Now I use examples/raspi_grove_pi_ultrasonic.go to check with Raspberry Pi Model B and ultrasonic model with HC-SR04.

I have some problems can not be solved.

HC-SR04 has 4 Pin with VCC,GND,Trig_RX-SCL_I/O, ECHO_DX_SDA but the code just defined ultrasonicPin = "4", so how can I connect
my raspberry pi with HC-SR04

and no matter what pin i connect the code always output write /dev/i2c-1: connection timed out. I want to know why.

in addition, I hope to have a website or other chat groups can get other developer's help quickly. I would be extremely grateful.

@gen2thomas
Copy link
Collaborator

Hello @TuringZhu ,

do you have really an I2C ultrasonic Model with the name HC-SR04? Normally this is an analog one. Please try to use this example instead:
https://github.com/hybridgroup/gobot/blob/release/examples/raspi_hcsr04.go

Good luck, Thomas

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