[RF69] Fixed typos in examples
This commit is contained in:
parent
3ad3e0cd61
commit
6e31c7b9be
6 changed files with 18 additions and 19 deletions
|
@ -35,7 +35,7 @@ void setup() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// set node address
|
// set node address
|
||||||
// NOTE: calling this method will autmatically enable
|
// NOTE: calling this method will automatically enable
|
||||||
// address filtering (node address only)
|
// address filtering (node address only)
|
||||||
Serial.print(F("[RF69] Setting node address ... "));
|
Serial.print(F("[RF69] Setting node address ... "));
|
||||||
state = rf.setNodeAddress(0x02);
|
state = rf.setNodeAddress(0x02);
|
||||||
|
|
|
@ -54,7 +54,6 @@ void setup() {
|
||||||
// rf.sleep()
|
// rf.sleep()
|
||||||
// rf.transmit();
|
// rf.transmit();
|
||||||
// rf.receive();
|
// rf.receive();
|
||||||
// rf.scanChannel();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// flag to indicate that a packet was received
|
// flag to indicate that a packet was received
|
||||||
|
@ -99,10 +98,10 @@ void loop() {
|
||||||
|
|
||||||
if (state == ERR_NONE) {
|
if (state == ERR_NONE) {
|
||||||
// packet was successfully received
|
// packet was successfully received
|
||||||
Serial.println("[RF69] Received packet!");
|
Serial.println(F("[RF69] Received packet!"));
|
||||||
|
|
||||||
// print data of the packet
|
// print data of the packet
|
||||||
Serial.print("[RF69] Data:\t\t\t");
|
Serial.print(F("[RF69] Data:\t\t\t"));
|
||||||
Serial.println(str);
|
Serial.println(str);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -106,7 +106,7 @@ void setup() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// up to 8 bytes can be set as sync word
|
// up to 8 bytes can be set as sync word
|
||||||
// NOTE: sync word must not conatin any zero bytes
|
// NOTE: sync word must not contain any zero bytes
|
||||||
// set sync word to 0x0123456789ABCDEF
|
// set sync word to 0x0123456789ABCDEF
|
||||||
uint8_t syncWord[] = {0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF};
|
uint8_t syncWord[] = {0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF};
|
||||||
if (rf1.setSyncWord(syncWord, 8) == ERR_INVALID_SYNC_WORD) {
|
if (rf1.setSyncWord(syncWord, 8) == ERR_INVALID_SYNC_WORD) {
|
||||||
|
|
|
@ -45,11 +45,11 @@ void loop() {
|
||||||
|
|
||||||
if (state == ERR_NONE) {
|
if (state == ERR_NONE) {
|
||||||
// the packet was successfully transmitted
|
// the packet was successfully transmitted
|
||||||
Serial.println(" success!");
|
Serial.println(F(" success!"));
|
||||||
|
|
||||||
} else if (state == ERR_PACKET_TOO_LONG) {
|
} else if (state == ERR_PACKET_TOO_LONG) {
|
||||||
// the supplied packet was longer than 64 bytes
|
// the supplied packet was longer than 64 bytes
|
||||||
Serial.println(" too long!");
|
Serial.println(F(" too long!"));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -62,11 +62,11 @@ void loop() {
|
||||||
|
|
||||||
if (state == ERR_NONE) {
|
if (state == ERR_NONE) {
|
||||||
// the packet was successfully transmitted
|
// the packet was successfully transmitted
|
||||||
Serial.println(" success!");
|
Serial.println(F(" success!"));
|
||||||
|
|
||||||
} else if (state == ERR_PACKET_TOO_LONG) {
|
} else if (state == ERR_PACKET_TOO_LONG) {
|
||||||
// the supplied packet was longer than 256 bytes
|
// the supplied packet was longer than 256 bytes
|
||||||
Serial.println(" too long!");
|
Serial.println(F(" too long!"));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,7 @@ void setup() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// set broadcast address
|
// set broadcast address
|
||||||
// NOTE: calling this method will autmatically enable
|
// NOTE: calling this method will automatically enable
|
||||||
// address filtering (node or broadcast address)
|
// address filtering (node or broadcast address)
|
||||||
Serial.print(F("[RF69] Setting broadcast address ... "));
|
Serial.print(F("[RF69] Setting broadcast address ... "));
|
||||||
state = rf.setBroadcastAddress(0xFF);
|
state = rf.setBroadcastAddress(0xFF);
|
||||||
|
@ -101,11 +101,11 @@ void loop() {
|
||||||
|
|
||||||
if (state == ERR_NONE) {
|
if (state == ERR_NONE) {
|
||||||
// the packet was successfully transmitted
|
// the packet was successfully transmitted
|
||||||
Serial.println(" success!");
|
Serial.println(F(" success!"));
|
||||||
|
|
||||||
} else if (state == ERR_PACKET_TOO_LONG) {
|
} else if (state == ERR_PACKET_TOO_LONG) {
|
||||||
// the supplied packet was longer than 256 bytes
|
// the supplied packet was longer than 256 bytes
|
||||||
Serial.println(" too long!");
|
Serial.println(F(" too long!"));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue