Hello i have a small problem i have a NEF2401 transceiver and I'm trying to get it working on a attiny84 currently at the moment i have it on a atmel 328p chip but i would like to use a attiny85 chip i have a sketch below but I'm not sure how to recode it to use on a attiny85 can someone please help me out.
#include <SPI.h>
#include "nRF24L01.h"
#include "RF24.h"
int msg[1];
// Set up nRF24L01 radio on SPI bus plus pins 9 & 10
//Contacts from the radio to connect NRF24L01 pinamnam -> Arduino
//SCK -> 13
//MISO -> 12
//MOSI -> 11
//CSN -> 10
//CE -> 9
RF24 radio(9,10);
const uint64_t pipe = 0xE8E8F0F0E1LL; // fax transmission channel
//button connected to these pins
int buttonPin1 = 2;
int buttonPin2 = 3;
void setup(void){
radio.begin();
radio.openWritingPipe(pipe); // Open channel
}
void loop(void){
//until the button (buttonPin1) pressed send the package (111) Arduino ?2
if (digitalRead(buttonPin1) == HIGH){
msg[0] = 111;
radio.write(msg, 1);
}
if (digitalRead(buttonPin2) == HIGH){
msg[0] = 112;
radio.write(msg, 1);
}
}
This may be of interest:
EDIT added ...
I'm trying to get it working on a attiny84 ... i would like to use a attiny85 chip
Could you clarify whether it is the 84 or 85 you want to get working ultimately? On first reading, I assumed the 85.
Hello it is a attiny84 chip 14 pins on it I'm sorry not 85 it's 84 chip i have attiny84 and 85 chips but at first i wanted to use the attiy85 but not enough pins so i would like to use attiny84 I'm sorry for the confusion.
Hello so basically i have to define the Spi pins on the attiny84 looks like the rest is okay from the one site it has
#if defined( AVR_ATtiny84 )
const static uint8_t SS = PA7;
const static uint8_t MOSI = PA6;
const static uint8_t MISO = PA5;
const static uint8_t SCK = PA4;
#endif
if I'm reading this correctly??
i mean the rest of the sketch is okay then to use. once i define the pins for the SPI.
The approach on the second link I posted uses a different library: Mirf modified to add Attiny support.
You can download it from that page. It already includes the necessary changes to the pin definitions. And it has a sample program for the Attiny84.
hello Hackscribble i do know how to program the attiny84 i did a few of them before I'm currently defining the pins for SPI to work from the looks of it the rest of the sketch should be the same just got to define the SPI pins thats all
i found out they are
#if defined( AVR_ATtiny84 )
const static uint8_t SS = 3;
const static uint8_t USI_DO = 5;
const static uint8_t USI_DI = 4;
const static uint8_t SCK = 6;
#endif
so I'm working on that now. thank you for the help i will post a update either way if works or don't work 
hey Hackscribble do you know how to get multiple nrf24l01 to transmit to the single receiver not at at once but get more then one to transmit? the receiver is on a arduino uno so i have 6 LED on it but can only light one up with the single receiver at the moment?
I have not done that myself.
However, there is an example program on the RF24 library GitHub pages which looks relevant:
http://maniacbug.github.io/RF24/starping_8pde-example.html