Remote control robot on 433 MHz RF module

For other supported Arduino products from Adafruit: Shields, accessories, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
User avatar
Deynox
 
Posts: 9
Joined: Sat Aug 29, 2015 10:37 am

Remote control robot on 433 MHz RF module

Post by Deynox »

Hi, I build my first remote control robot. I want to use 433 MHz RF module. I have 2 Arduino Uno, 2 PS2 joystick and Adafruit Motor Shield v1.
I want to control 1 DC motor(first joystick), and 2 servo(secound joystick), but I have a problem with code.
I found only 1 code for RF modul:
https://gist.github.com/conoro/223035df942b72d2d2f6
https://gist.github.com/conoro/8430ec8753317883c2b7
I try to modified this but my knowledge about C/C++ is too small.

Please help me, because I really need to finish this project.

User avatar
adafruit_support_bill
 
Posts: 88088
Joined: Sat Feb 07, 2009 10:11 am

Re: Remote control robot on 433 MHz RF module

Post by adafruit_support_bill »

What RF modules are you using? The ones we sell do not work with the VirtualWire library.

User avatar
Deynox
 
Posts: 9
Joined: Sat Aug 29, 2015 10:37 am

Re: Remote control robot on 433 MHz RF module

Post by Deynox »

Like this: http://forum.arduino.cc/index.php?topic=256437.0
I used example program to send message from transmitter to reciever and it works fine.

User avatar
adafruit_support_bill
 
Posts: 88088
Joined: Sat Feb 07, 2009 10:11 am

Re: Remote control robot on 433 MHz RF module

Post by adafruit_support_bill »

What exactly is the problem you are having. We are not familiar with those RF modules, but we might be able to help with the motor shield code.

User avatar
Deynox
 
Posts: 9
Joined: Sat Aug 29, 2015 10:37 am

Re: Remote control robot on 433 MHz RF module

Post by Deynox »

If it possible I want to control motor speed but I don't know how to do this, and I how to modify this code to control 2 servo. I try to solve this problem but I don't know how. The only thing that I know is I must use other library than <Servo.h>, e.g. <ServoTimer2.h>

User avatar
adafruit_support_bill
 
Posts: 88088
Joined: Sat Feb 07, 2009 10:11 am

Re: Remote control robot on 433 MHz RF module

Post by adafruit_support_bill »

To control the motor speed you first need to read the joystick position. Are you able to get the joystick position from your radio modules?

User avatar
Deynox
 
Posts: 9
Joined: Sat Aug 29, 2015 10:37 am

Re: Remote control robot on 433 MHz RF module

Post by Deynox »

Yes of course.

User avatar
adafruit_support_bill
 
Posts: 88088
Joined: Sat Feb 07, 2009 10:11 am

Re: Remote control robot on 433 MHz RF module

Post by adafruit_support_bill »

Then you should be able to use the code posted earlier to control the motor speed.

User avatar
Deynox
 
Posts: 9
Joined: Sat Aug 29, 2015 10:37 am

Re: Remote control robot on 433 MHz RF module

Post by Deynox »

Unfortunately, I try and it's doesn't work, because command motor_speed not working so I can use only set.speed.
Maybe I am doing something wrong, I don't know.

And when I try to stop the motor for a moment I lose control of him as if he had to do specified number of revolutions.
Last edited by Deynox on Sun Aug 30, 2015 2:52 am, edited 3 times in total.

User avatar
adafruit_support_bill
 
Posts: 88088
Joined: Sat Feb 07, 2009 10:11 am

Re: Remote control robot on 433 MHz RF module

Post by adafruit_support_bill »

Please post photos showing your soldering and connections to the shield.

User avatar
Deynox
 
Posts: 9
Joined: Sat Aug 29, 2015 10:37 am

Re: Remote control robot on 433 MHz RF module

Post by Deynox »

Image

User avatar
adafruit_support_bill
 
Posts: 88088
Joined: Sat Feb 07, 2009 10:11 am

Re: Remote control robot on 433 MHz RF module

Post by adafruit_support_bill »

The pins in your diagram don't match the pins defined in the code, so I don't see how it is possible for you to be getting the joystick positions via the RF modules.

The motor shield in the photo is not an Adafruit motor shield. You should contact the manufacturer for questions about that.

User avatar
Deynox
 
Posts: 9
Joined: Sat Aug 29, 2015 10:37 am

Re: Remote control robot on 433 MHz RF module

Post by Deynox »

Yeah, I know because I send not modified version of this code. But what's the difference in code between these motor shield ?
I use AFmotor library to control the motors.

User avatar
adafruit_support_bill
 
Posts: 88088
Joined: Sat Feb 07, 2009 10:11 am

Re: Remote control robot on 433 MHz RF module

Post by adafruit_support_bill »

The code you posted is for an Adafruit motor shield. The shield pictured in your diagram is not an Adafruit motor shield, so it may not be compatible.

User avatar
Deynox
 
Posts: 9
Joined: Sat Aug 29, 2015 10:37 am

Re: Remote control robot on 433 MHz RF module

Post by Deynox »

Maybe, but motor is working somehow..., so can you help me to write the code to receive joystick position to control servo ?
Code:
http://majsterkowo.pl/forum/download/file.php?id=2307
http://majsterkowo.pl/forum/download/file.php?id=2306

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Arduino products from Adafruit”