I'm looking for some advice on where to find info on how to code my df ir to my Arduino uno. I have set up a basic test prg to run the servo's and gotten the ir codes. Having issues using the codes to tell the uno how to move the servo's. Any advice would be appreciated.
IR Library
To get you started, try the IR library an refer to page 12/16 here for determining IR codes:
https://www.robotshop.com/media/files/pdf/dfrobotshop-rover-shield-user-guide.pdf
Once you know what value your remote is sending, you can use it to control the servos. If you’re not sure how to use servos, refer to the Arduino servo library.
This is the problem , i am
This is the problem , i am using servo motor, they do not require a motor shield . Every bit of info out there assumes your using a motor shield . I have an arduino motor shield has no connection for servo motors. I have the ir codes , have tested using a two servo motor sketch . The issue i have is how to tell the arduino to use the ir codes to move the servo motors in the manner i require. The servo libray is simply how to move a servo through a preprogrammed set of commands not via ir. All the ir info assumes one is using a motor shield which i am not. I am simply attempting to use the ir and arduino to replicate what i can do using my dx 6e transmitter. The vehicle moves fine with the sevo’s using the dx6e but i have bigger long term plans hence the arduino but figure i would start small and get it moving first via ir and arduino then move on.
Check the documentation on the Arduino website.
I have never found better documentation than on the arudino website. Feel free to check it out.
Yep been there all the
Yep been there all the info is ir controlled via motor shield nothing on ir controlling servos. lots of info on controlling servo’s via poteniometre and pre prg movements but not via ir.
Arduino examples.
Go to File//Examples//Servo//Sweep in arduino ide you should see an example of how to use a servo with an arduino library.
The library and sample code
The library and sample code do not have anything to do with motors. The servo library also indicates how to send a position command to a servo (in degrees). For example:
- Have the microcontroller constantly scanning for IR signals and processing them.
- If a certain button on the remote control is pressed, increment the servo’s angle by one degree every second.
- If a different button on the remote control is pressed, decrement the servo’s angle by one degree every second.
- If a third button is pressed, associate that with a “stop at the current angle” command.
- Alternatively you can use the “case” statement.
If you’re entirely new to programming, connect the IR receiver to the Arduino and simply have it display the character associated with that command via the serial terminal window. The next step is to become familiar with the servo library and have it accept commands to move to specific angles. You would then merge the two the way you want.
I have all the ir codes
I have all the ir codes thats not the issue , can make the servo,s move via code with the arduino again not an issue. But where are the tutorials or info that explain how to take the code for say fwd and use that to tell the servos to move fwd of say right and how to define that to tell the code to reverse one servo while the other goes fwd. Lots of info on that for h bridge controllers , none for servos.
I have both the arduino
I have both the arduino projects book and quick start guide both do not deal with that . i am simply looking for info on how to use them ir codes to tell the servos what to do without having to use a motor shiled as a servo is pwn controlled and h bridge controllers are not pwm
rven searched thru you tube
rven searched thru you tube tons on using motor sheilods and how to retrieve code nothing even remotely dealing with what i need. Like its some kinda of guarded secret.
Some progress it now goes
Some progress it now goes forward and reverse turns out one thing most every tutorial neglected was adding the 0x infront of the ir code . Kinda of an important bit of info to know . Now its just going thru and adding the functions one at a time now that im past that hurdle.
This you might have to figure out with trial and error
Sorry buddy you might have to do this yourself. Sorry!!!