hi
I have been trying to control a servo to go to 100little circle when i press the + button on my remote but it won't work ![]()
here is my code
/code/
/*
Some Sample code of how to use your IR remote
- Lets get started:
The IR sensor's pins are attached to Arduino as so:
Pin 1 to Vout (pin 11 on Arduino)
Pin 2 to GND
Pin 3 to Vcc (+5v from Arduino)
*/
#include <IRremote.h>
#include <Servo.h>
int IRpin = 11; // pin for the IR sensor
int pos = 100;
IRrecv irrecv(IRpin);
decode_results results;
Servo myservo;
void setup()
{
Serial.begin(9600);
irrecv.enableIRIn(); // Start the receiver
myservo.attach(9);
}
void loop()
{
if (irrecv.decode(&results))
{
Serial.println(results.value, DEC);
irrecv.resume(); // Receive the next value
}
if (results.value == 16754775) // change zero to your IR remote button number
{
myservo.write(pos);
delay(15);
}
/code/
is it my coding skills or something else.
servo = pin 9
IR = pin 11