i am currently trying to control my s107g rc helicopter using an arduino and an ir led. My goal is to simply write a sketch to control the helicopter into flying preprogrammed flights. However the only method to do this that i found to be effective was to actually copy each time from each and every position on the rc remote in milliseconds which for each signal is 68 total times. It would be much easier if there where a way to actually pulse hex values. Is there any way to pulse a hex value to my ir led.
Hi,
Why change it to IR, it works perfectly well as R/C and if you convert to IR I think your range will be limited.
Trying to get it to fly pre-programmed flights may be possible but you are at the whim of breezes and obstacles in the way that it cannot detect.
You may be able to hack into the existing Tx unit with the arduino.
There is a hacks section on the forum that may help you.
Tom..... ![]()
Hi there
I had the same type of problem for controlling a RC car. Your project is way more advanced, but maybe you can have a look at this sketch that worked for me. All the actions go in the setup, then you just call them in the loop function:
Car Test
Makes the modified RC car go in a figure 8.
Plug the striped white wires into the Arduino pins as
*/
int forward = 12; // forward pin
int reverse = 11; // reverse pin
int left = 10; // left pin
int right = 9; // right pin
// The setup() method runs once, when the sketch starts
void setup() {
// initialize the digital pins as an outputs:
pinMode(forward, OUTPUT);
pinMode(reverse, OUTPUT);
pinMode(left, OUTPUT);
pinMode(right, OUTPUT);
}
void go_forward()
{
digitalWrite(forward,HIGH); // turn forward motor on
digitalWrite(reverse,LOW); // turn revers motor off
}
void go_reverse()
{
digitalWrite(reverse,HIGH); // turn reverse motor on
digitalWrite(forward,LOW); // turn forward notor off
}
void stop_car()
{
digitalWrite(reverse,LOW); // turn revers motor off
digitalWrite(forward,LOW); // turn forward motor off
digitalWrite(left,LOW);
digitalWrite(right,LOW);
}
void go_left()
{
digitalWrite(left,HIGH); // turn left motor on
digitalWrite(right,LOW); // turn right motor off
}
void go_right()
{
digitalWrite(right,HIGH); // turn right motor on
digitalWrite(left,LOW); // tune left motor off
}
// the loop() method runs over and over again,
// as long as the Arduino has power
void loop()
{
go_forward();
delay(1000);
go_right();
delay(3000);
go_forward();
delay(1000);
go_left();
delay(3000);
go_forward();
delay(1000);
go_right();
delay(3000);
}
Is there any way to pulse a hex value to my ir led.
Yes, use one of the IR libraries - IRremote or IRLib
If you are not using a standard IR protocol (e.g. NEC ), use the sendRAW function to 'roll your own'
Caution: many IR receivers are designed to reject continuous streams of IR.
TSSP4038 is designed not to.