Hi,
I want to use an NRF24l01 transceiver with a LED and control it with Arduino, I already got the code working on Arduino but I want to shrink my project
This is the code I use for the LED:
#include <RF24.h>
//int msg[1];
int ReceivedMessage[1] = {000}; // Used to store value received by the NRF24L01
RF24 radio(9,10);
const uint64_t pipe = 0xE8E8F0F0E1LL;
int LED1 = 3;
void setup(void){
radio.begin();
radio.setPALevel (RF24_PA_MAX);
radio.setDataRate (RF24_250KBPS);
radio.openReadingPipe(1,pipe);
radio.startListening();
pinMode(LED1, OUTPUT);}
void loop(void){
while (radio.available()){
radio.read(ReceivedMessage, 1); // Read information from the NRF24L01
if (ReceivedMessage[0] == 111)
{delay(10);digitalWrite(LED1, LOW);}
else {digitalWrite(LED1, HIGH);}
delay(10);}}
//else{Serial.println("No radio available");}}
My question is: what would be the best/easiest standalone microcontroller to use with the NRF24l01?
I already used the attiny85 solution but it's too difficult to control with the 3 pin solution for the NRF24l01 and it's not very reliable, I also tried the attiny2312 but there isn't enough space on it to use the code, I also tried the atmega328p but I'm looking for other smaller solutions