Hey guys i need help, i'm trying to transmit the data from my ultrasonic sensor to another arduino, is there a code? I have a 433MHz transmitter and receiver pair and 2 arduinos, please help me i'm new
This is my 8 Ping sensor code that sends using i2c to another Arduino UNO.
you will need to look over the code and see what may need to be adapted to work with your situation.
Pin 2 is my trigger pin and all ping sensors are triggered at the same time(Blue Wire).
pins 3 ~ 10 (8 ultra sound units) are used for receiving the echo (Yellow Wires).
I hope this is helpful
Full code attached
master_reader_for_UltrasonicPingAllAtOnceI2C.ino (993 Bytes)
UltrasoundPingAllAtOnceI2CxSerial.ino (7.79 KB)
Snoorelax:
Hey guys i need help, i'm trying to transmit the data from my ultrasonic sensor to another arduino, is there a code? I have a 433MHz transmitter and receiver pair and 2 arduinos, please help me i'm new
If they're the simple cheap ASK RF modules, check out the "VirtualWire" library for your communications.
(If you post a link to the modules we can easily tell what type they are, otherwise a photo could help.)
It's best to build up slowly - start with a few examples from the IDE, then get basic communications using the RF modules and "VirtualWire" working, then expand to reading the 'ping' sensor and transmitting the range data.
You might find the "NewPing" library useful too, for the ultrasonic 'ping' sensor.
You can find "VirtualWire" here:- VirtualWire Library, for very cheap wireless communication
And "NewPing" here:- https://bitbucket.org/teckel12/arduino-new-ping/wiki/Home