Commit 996d4f44 authored by Felix Baum (DB4UM)'s avatar Felix Baum (DB4UM)
Browse files

nun mit .ino

parent cbbaa1a7
#include <RFM69.h> //get it here: https://www.github.com/lowpowerlab/rfm69
#include <SPI.h>
#define FREQUENCY 439987500 // 439.9875 MHz
#define IS_RFM69HCW true // set to 'true' if you are using an RFM69HCW module
#define SERIAL_BAUD 38400
#define RFM69_CS 10
#define RFM69_IRQ 2
#define RFM69_IRQN 0 // Pin 2 is IRQ 0!
#define RFM69_RST 9
RFM69 radio = RFM69(RFM69_CS, RFM69_IRQ, IS_RFM69HCW, RFM69_IRQN);
String message = "";
boolean messageComplete = false;
void setup() {
while (!Serial); // wait until serial console is open, remove if not tethered to computer
Serial.begin(SERIAL_BAUD);
// Hard Reset the RFM module
pinMode(RFM69_RST, OUTPUT);
digitalWrite(RFM69_RST, HIGH);
delay(100);
digitalWrite(RFM69_RST, LOW);
delay(100);
// Initialize radio
radio.initialize(RF69_433MHZ,0,0);
if (IS_RFM69HCW) {
radio.setHighPower(); // Only for RFM69HCW & HW!
}
radio.setPowerLevel(0); // power output ranges from 0 (5dBm) to 31 (20dBm)
// Set to ham POCSAQ frequency
radio.setFrequency(FREQUENCY);
// Disable encryption
radio.encrypt(0);
message.reserve(512); // reserve 512 bytes just to be sure
}
void loop() {
char cmessage[500];
int i;
for(i=0; i<500; i++) {
cmessage[i] = 0xAA;
}
radio.send(0, cmessage, strlen(cmessage), 0);
message = "";
delay(10); // wartezeit einstellen
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment