diff --git a/rfm02.cpp b/rfm02.cpp index eaa46e2..989f0f6 100644 --- a/rfm02.cpp +++ b/rfm02.cpp @@ -112,3 +112,44 @@ uint8_t i=8; } } + +void RFM02::sendMessage(uint8_t *txData, uint8_t size) +{ + + //digitalWrite(_pinChipSelect, LOW); // CS LOW + writeRegister(0xC0,0x39); // enable TX + //digitalWrite(_pinChipSelect, HIGH); // CS HIGH + //delay(1000); + RFM02_TX_DataByte_FSK(0xAA); // preamble + RFM02_TX_DataByte_FSK(0xAA); // preamble + RFM02_TX_DataByte_FSK(0xAA); // preamble + + RFM02_TX_DataByte_FSK(0x2D); // sync word high + RFM02_TX_DataByte_FSK(0xD4); // sync word low + + for(int myLoop=0;myLoop