I've two MakerFocus NRF24L01+PA+LNA Wireless Transceiver RF Transceiver Module 2.4G 1100m
that I am trying to use a simple button script with.
I am trying to debug with an LED in pin 13 and Serial.out.
If radio.begin(); and radio.openWritingPipe(pipe); the LED does not light up on PIN 13
and I get strange output on the Serial moitor.
Any ideas would be appreciated.
#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
int msg[1];
RF24 radio(9,10);
const uint64_t pipe = 0xE8E8F0F0E1LL;
const int buttonPin = 7; // the number of the pushbutton pin
const int ledPin = 13; // the number of the LED pin
int buttonState = 0;
void setup(void){
Serial.begin(9600);
//radio.begin();
//radio.openWritingPipe(pipe);
pinMode(ledPin, OUTPUT);
pinMode(buttonPin, INPUT);
}
void loop(void){
buttonState = digitalRead(buttonPin);
if (buttonState == HIGH) {
digitalWrite(ledPin, HIGH);
} else {
digitalWrite(ledPin, LOW);
}
# rf out code
//if (digitalRead(SW1) == HIGH){
//msg[0] = 111;
//radio.write(msg, 1);}
}