Hi all
I keep on getting a "Does not name a type error" for this line of code, how do i fix it?
nrf905=nRF905(NRF905_CSN);
Error message:
'nrf905' does not name a type; did you mean 'nRF905'?
I know it says change to nRF905 but that is already a variable thing from the library i'm using
Full Code:
#include <SPI.h>
#include <nRF905.h>
int NRF905_CSN = 10;
nrf905=nRF905(NRF905_CSN);
byte Message[] = {0b00000000, 0b10000001, 0b10000010, 0b10000011, 0b10000100, 0b10000101, 0b10000110, 0b10000111, 0b10001000, 0b10011000, 0b10101000, 0b10111000, 0b11001000, 0b11011000, 0b11101000, 0b11111001, 0b00101001, 0b00111001, 0b01011001, 0b01101001, 0b01111001, 0b10011010, 0b10011011, 0b10011101, 0b10011110, 0b10011111, 0b10101010, 0b11101011, 0b01101011, 0b11101101, 0b11101110, 0b11111111};
byte mess_Address = {0xB54CAB34};
void setup() {
// put your setup code here, to run once:
pinMode(NRF905_CSN, OUTPUT); //to make sure SPI works
nrf905.init();
nrf905.events(
NULL,
NULL,
nRF905_onTxComplete,
NULL
);
nrf905.setTransmitPower(NRF905_PWR_10);
nrf905.setChannel(106);
nrf905.setBand(NRF905_BAND_433);
nrf905.setAutoRetransmit(false);
nrf905.setCRC(NRF905_CRC_16);
nrf905.setPayloadSize(32, 0); // Will transmit 5 byte payloads, receive 32 byte payloads
nrf905.setAddressSize(4, 4);
nrf905.write(mess_Address, Message, sizeof(Message));
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
nrf905.TX(NRF905_NEXTMODE_STANDBY, false);
}