Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ** RECV **
- #include <SPI.h>
- #include <RFM69.h>
- #include <RFM69Config.h>
- RFM69 radio;
- void interrupt_function(){
- radio.isr0();
- }
- void setup() {
- Serial.begin(115200);
- radio.init();
- attachInterrupt(0, interrupt_function, RISING);
- delay(100);
- // radio.setFrequency(868.0f);
- radio.setModeRx();
- }
- void loop() {
- if (radio.available()) {
- Serial.print(radio.lastRssi());
- uint8_t buf[65];
- uint8_t len = sizeof(buf) - 1;
- radio.recv(buf, &len);
- buf[64] = 0x00;
- Serial.println((char *)buf);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment