diff --git a/README.md b/README.md index b3333d0..5fbdde3 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,13 @@ required because the RFM69HCW radio is integrated with the Feather board. The receiver takes USB HID reports from the RFM69 radio then sends to the computer over USB. +Be sure to follow Adafruit's tutorials for both boards to make sure the boards +work and the libraries are installed. + ## USB keyboard receiver + +![Adafruit Feather RFM69 board](./images/usbkbdrfm69rx.jpg) + ``` 915 MHz -> Feather 32u4 RFM69HCW -> USB cable -> Computer ``` @@ -29,24 +35,28 @@ computer. The Feather is powered from the computer. ## USB keyboard sender +![Feather M0 RFM69 and USB keyboard](./images/usbkbdrfm69tx.jpg) + +The components from left to right are: + +* CP2104 USB serial adapter +* Feather M0 with RFM69HCW +* USB phone/tablet charger, 5V 1A +* USB keyboard + ``` USB USB OTG Host Keyboard -> cable/adapter -> Feather M0 RFM69HCW -> 915 MHz - GND USB Tx - | ^ | - | | | - | | v - GND 5V RxD - CP2104 USB to serial -> Computer + GND USB Tx Rx + | ^ | ^ + | | | | + | | v | + GND 5V RxD TxD + CP2104 USB to serial -> Computer or 5V ``` -WARNING: The sender must use the M0 Feather version because the M0 has USB host -capability. The 32u4 does not. - -* USB keyboard -* USB OTG Host Cable - MicroB OTG male to A female -* Adafruit Feather M0 RFM69HCW Packet Radio -* Adafruit CP2104 Friend - USB to Serial Converter +WARNING: The sender must use the M0 version because it has USB host capability. +The 32u4 does not. Headers and breadboard are used to connect to power to the Feather board. An antenna is required. @@ -70,6 +80,10 @@ twice to put the board in upload mode. Automatic upload does not work. Feather M0 RFM69HCW -> USB cable -> Computer ``` +Another option to avoid switching cables, is upload through the CP2104 board +and the Serial1 port. The RESET button must still be double clicked to start +the upload. + ### Sender mode When using the Feather in keyboard sender mode, the Feather must be powered by diff --git a/USBKbdRFM69Rx/USBKbdRFM69Rx.ino b/USBKbdRFM69Rx/USBKbdRFM69Rx.ino index e982640..d1515ce 100644 --- a/USBKbdRFM69Rx/USBKbdRFM69Rx.ino +++ b/USBKbdRFM69Rx/USBKbdRFM69Rx.ino @@ -5,7 +5,7 @@ * Based on an example included in Adafruit's fork of the RadioHead library. */ -//8#define DEBUG_KEYBOARD_RAW +//#define DEBUG_KEYBOARD_RAW #include @@ -29,7 +29,7 @@ #define LED 13 #endif -#if defined(ARDUINO_SAMD_FEATHER_M0) // Adafruit Feather M0 w/Radio +#if defined(ADAFRUIT_FEATHER_M0) // Adafruit Feather M0 w/Radio #define RFM69_CS 8 #define RFM69_INT 3 #define RFM69_RST 4 @@ -162,4 +162,3 @@ void loop() { } } } - diff --git a/USBKbdRFM69Tx/USBKbdRFM69Tx.ino b/USBKbdRFM69Tx/USBKbdRFM69Tx.ino index ec1a752..3f4e630 100644 --- a/USBKbdRFM69Tx/USBKbdRFM69Tx.ino +++ b/USBKbdRFM69Tx/USBKbdRFM69Tx.ino @@ -28,7 +28,7 @@ #define LED 13 #endif -#if defined(ARDUINO_SAMD_FEATHER_M0) // Adafruit Feather M0 w/Radio +#if defined(ADAFRUIT_FEATHER_M0) // Adafruit Feather M0 w/Radio #define RFM69_CS 8 #define RFM69_INT 3 #define RFM69_RST 4 @@ -143,7 +143,7 @@ void setup() //while (!SERIAL_PORT_MONITOR); // Wait for serial port to connect - used on Leonardo, Teensy and other boards with built-in USB CDC serial connection SERIAL_PORT_MONITOR.println("KeyboardRaw Program started"); - if (usb.Init() == -1) + if (usb.Init()) SERIAL_PORT_MONITOR.println("USB host controller did not start."); delay( 20 ); @@ -193,4 +193,3 @@ void loop() // Process USB tasks usb.Task(); } - diff --git a/images/usbkbdrfm69rx.jpg b/images/usbkbdrfm69rx.jpg new file mode 100644 index 0000000..5e55dde Binary files /dev/null and b/images/usbkbdrfm69rx.jpg differ diff --git a/images/usbkbdrfm69tx.jpg b/images/usbkbdrfm69tx.jpg new file mode 100644 index 0000000..6616144 Binary files /dev/null and b/images/usbkbdrfm69tx.jpg differ