Rev Author Line No. Line
2112 kakl 1 /*
2131 kakl 2 RF02 TX sample for Arduino
2112 kakl 3  
2131 kakl 4 in arduino version 022
2112 kakl 5  
2131 kakl 6 tested with MLAB modules with ATmega 328 at 16MHz
7 see RF02 library for a Band and Frequency
2112 kakl 8 */
9  
2131 kakl 10 //connections RF02: (TX)
11 // SDI, -> RF02 Atmega PB0 Arduino 8 cannot be changed
12 // SCK, -> RF02 Atmega PB1 Arduino 9 cannot be changed
13 // nSEL, -> RF02 Atmega PB2 Arduino 10 cannot be changed
14 // nIRQ, <- RF02 Atmega PB4 Arduino 12 cannot be changed
15 // FSK: Pullupto VCC
2112 kakl 16  
17 #include <RF02.h>
18  
2131 kakl 19 void setup()
20 {
21 Serial.begin(9600);
22 Serial.println("\nSTM02 init" );
23  
24 rf02_prepAll();
2112 kakl 25  
2131 kakl 26 Serial.println("done" );
2112 kakl 27 }
28  
2124 kakl 29 void loop()
30 {
2131 kakl 31 unsigned char _tx_buffer[]="0123456789";
2112 kakl 32  
2131 kakl 33 delay(1000);
2112 kakl 34  
2131 kakl 35 rf02_txdata( _tx_buffer, sizeof(_tx_buffer));
2112 kakl 36 }
37  
38