Radio 915MHz 3dr Module Telemetry With Arduino
by ánegreiros in Circuits > Arduino
26678 Views, 28 Favorites, 0 Comments
Radio 915MHz 3dr Module Telemetry With Arduino



Necessary Equipment :
- Arduino uno/mega/nano
- Ultrasonic sensor with trig and echo ports
- Radio 915MHz 3DR with transceiver and receptor (usb)
- arduino cable
- Breadboard
- Jumpers
Code

Copy, paste this code on arduino ide and upload to your arduino.
int trig = 5;
int echo = 3;
float ttime;
float distance_cm;
void setup() {
pinMode(trig,OUTPUT);
digitalWrite(trig,LOW);
delayMicroseconds(10);
Serial.begin(57600);
pinMode(echo,INPUT);
}
void loop() {
digitalWrite(trig, HIGH);
delayMicroseconds(10);
digitalWrite(trig, LOW);
ttime = pulseIn(echo, HIGH);
distance_cm = ttime / 29.4 / 2;
Serial.print("Distance CM: ");
Serial.println(distance_cm);
delay(200);
}
Plugging the Stuff
.png)
.png)
- Plug 3DR receiver on pc usb. Find out want com number.
- Connect the ultrasonic and the transceiver like the diagram above
- I didn’t found the 3dr radio on fritzing, so I replaced with a Bluetooth. But is the same idea. Tx 3DR on RX arduino. Rx 3DR on TX arduino.
- Open Serial monitor in arduino IDE, select the respective COM of the 3DR receptor.
- Set the same baud rate ( 57600).
- Have fun!