i have a arduino nano on a soldered on to a circuit board with a Yk04 reciver and when i send click something on the remote nothing happens there is also a led attached that should turn on when i hit the button but its not, heres my code
#include <rm4.h>
static const int knablePin = 8;
static const int PinA = 4;
static const int PinB = 5;
static const int PinC = 6;
static const int PinD = 7 ;
int CheckLedPin = 12;
RM4 remote(PinA, PinB, PinC, PinD);
void setup() {
// put your setup code here, to run once:
pinMode(kEnablePin, OUTPUT);
digitalWrite(kEnablePin, HIGH);
pinMode(CheckLedPin, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
const int button_code = remote.buttonCode();
Serial.println(button_code);
if (button_code == 8) {
digitalWrite(CheckLedPin, HIGH);
}
}
im supplying 5v to the arduino nano from my computer.
Also please provide a link to the "Yk04" receiver, few people here really have time to Google the parts that posts mention. Maybe also the "rm4" in the code, not mentioned in the text..
Also please detail any testing (troubleshooting) you have done, or say none if there was none.
I've completed almost 1000 projects starting with not knowing the components. In a surprising large number of cases, I've found that I knew more about them than the designers did. But if you want to be petulant about it, goodbye.
it may because the power source, because the receiver requires 5v and im supplying 5v to the nano and connecting a receiver and led to it. thats really all i got
hey im still trying to tackle this and i tried debuging i decided to print out the button_code (in the code above) and it only outputs 14 and does not change when i hit any button does anyone know what that means?