File tree Expand file tree Collapse file tree
Factory_Tests/Feather_RP2040_RFM69 Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ // rf69 demo tx rx.pde
2+ // -*- mode: C++ -*-
3+ // Example sketch showing how to create a simple messageing client
4+ // with the RH_RF69 class. RH_RF69 class does not provide for addressing or
5+ // reliability, so you should only use RH_RF69 if you do not need the higher
6+ // level messaging abilities.
7+ // It is designed to work with the other example rf69_server.
8+ // Demonstrates the use of AES encryption, setting the frequency and modem
9+ // configuration
10+
11+ #include < RH_RF69.h>
12+ #include " Adafruit_TestBed.h"
13+
14+ extern Adafruit_TestBed TB;
15+
16+ // Singleton instance of the radio driver
17+ RH_RF69 rf69 (PIN_RFM_CS, PIN_RFM_DIO0);
18+
19+ void setup ()
20+ {
21+ Serial.begin (115200 );
22+
23+ pinMode (PIN_LED, OUTPUT);
24+ pinMode (PIN_RFM_RST, OUTPUT);
25+ digitalWrite (PIN_RFM_RST, LOW);
26+
27+ TB.neopixelPin = PIN_NEOPIXEL;
28+ TB.neopixelNum = 1 ;
29+ TB.begin ();
30+
31+ Serial.println (" Feather RFM69 Feather Self-test!" );
32+ Serial.println ();
33+ }
34+
35+ uint8_t x = 0 ;
36+
37+ void loop () {
38+ TB.setColor (TB.Wheel (x++));
39+
40+ if (x == 255 ) {
41+ // manual reset
42+ digitalWrite (PIN_RFM_RST, HIGH);
43+ delay (10 );
44+ digitalWrite (PIN_RFM_RST, LOW);
45+ delay (10 );
46+
47+ if (!rf69.init ()) {
48+ Serial.println (" RFM69 radio init failed" );
49+ while (1 );
50+ }
51+ Serial.println (" RFM69 radio init OK!" );
52+ }
53+
54+ delay (10 );
55+ }
You can’t perform that action at this time.
0 commit comments