FILES ===== readme_radiofaro.txt - this file. arduino-0021-crosspack20100115.zip - MAC OSX Package with updated AVR tool chain arduino-0021-uracoli-expert.zip arduino-0021-uracoli.zip - Windows Packages with updated AVR tool chain (WinAvr + latest avrdude) arduino-0021-uracoli.tgz - Linux Package with updated AVR tool chain (avrdude) radiofaro_schematics_1v3.PDF - schematics of RadioFaro uracoli-cvs20101107-arduino.zip - Third Party Radiofaro package w/ radio core and examples. Installation ============ - install the suitable arduino-0021* archive according to your system. - run the arduino IDE once, so that it creates your lokal sketchbook folder. - unzip the package uracoli-cvs20101107-arduino.zip in the sketchbook folder it creates the following structure: sketchbook/ |-- examples | |-- HelloRadio | |-- IoRadio | `-- RadioUart |-- hardware `-- uracoli |-- bootloaders | `-- radiofaro `-- cores `-- radiofaro `-- boards Functions for class Radio ========================= ... for details see HardwareRadion.(h,cpp) ... Startup: void HardwareRadio::begin (void) constructor 1 void HardwareRadio::begin (uint8_t channel, uint8_t idlestate) constructor 2 TX: void HardwareRadio::put (int16_t value) Insert a 16 bit integer value in the stream void HardwareRadio::write (char * str) Method to write a string void HardwareRadio::flush (void) Flush the TX buffer. RX: void HardwareRadio::write (uint8_t byte) Method to write a byte int HardwareRadio::read (void) Read a byte from the RX bufffer. void HardwareRadio::get_int (int16_t & value) Retireve a 16 bit integer value from the stream int HardwareRadio::available (void) Check if data in the RX buffer is availbale. Example Sketch: =============== /* data captured from UART */ int serial_inbyte = 0; /* data received from Radio */ int serial_outbyte = 0; /* next time the radio buffer will flushed */ unsigned long tx_time; void setup() { Radio.begin(); Serial.begin(38400); tx_time = 0; } void loop() { if ((Serial.available() > 0)) { serial_inbyte = Serial.read(); Radio.write(serial_inbyte); } if (millis() > tx_time){ tx_time = millis() + 25; Radio.flush(); } if (Radio.available() > 0) { serial_outbyte = Radio.read(); if (serial_outbyte == DATA_INT) { int d; Radio.get_int(d); Serial.print(d); } else if (serial_outbyte >= 0) { Serial.print((char)serial_outbyte); } } }