[Return to PS70 Networking menu](../index.html) <video width="500" height="300" controls> <source src="Arms_trimmed.mp4" type="video/mp4"> </video> ![pic](radio_sketch.jpg) [Good background and tutorial on using this radio with Arduino](https://lastminuteengineers.com/nrf24l01-arduino-wireless-communication/) ###Step-by-step instructions for radio connection. <b>1. Install library for this radio through the Arduino Libary Manager: "RF24 by TMRh20"</b> <b>2. Connect female/male wires to radio chip as shown below. </b> <b>3. Connect wires to microcontroller pins, following the table below, or the instructions [here](http://tmrh20.github.io/RF24/) </b> <b>4. Load the appropriate send and receive sketches. Check for success using the Arduino Serial Monitor. </b> ###Pin connection for radios ![pic](radio_pinout.jpg) ![pic](radio_pic.jpg) ###Pin connections to microcontroller Pin on radio |D11 board |ItsyBitsy D51 board|Adafruit ESP32 Feather ------------- | ------------- 1 GND| GND|GND|GND 2 VCC| 3V3|3V3|3V3 3 CE| pin 8|pin 7|32 (or other) 4 CS or SS| pin 15 (=SS)|pin 9|14 (or other) 5 SCK| pin 5|SCK|SCK 6 MOSI| pin 4|MO (=MOSI)|MO (=MOSI) 7 MISO| pin 14|MI (=MISO)|MI (=MISO) [For other boards, follow connection instructions](http://tmrh20.github.io/RF24/) from Github site for the RF24 library. ![pic](d11_conn.jpg) ![pic](itsy_conn.jpg) ###Code [Transmit code ](./simple_xmit_SAMD11.txt). For SAMD11 board. Change CE and CS pins for use with other boards. [Receive code](./simple_rec_Itsy.txt). Pins chosen for ItsyBitsy M4 board. Change CE and CS for other boards. <b>Note: For SAMD11 Mattair board, Set serial config to ONE_UART_NO_WIRE_ONE_SPI.</b> ###Serial output Below is a screen showing the serial outputs (through USB from each microcontroller) of both send and recieve boards. The window on the right is from the Arduino Serial Monitor. Since Arduino can talk to only one serial device at a time, I used a separate terminal application, shown as the window on the left, for the transmitting board. In this example, it was [CoolTerm](https://freeware.the-meiers.org/) - a free cross-platform app that works well for me. ![pic](serial_screen.png) ###Example using potentiometer (send) and servo (receive) ![pic](pot_send.jpg) ![pic](servo_rec.jpg) [Transmit code for sending from potentiometer board. ](./pot_send_SAMD11.txt) For SAMD11 board. Change CE and CS pins for use with other boards. This code is actually almost too big for the SAMD11. Better to use Huzzah or other board. [Transmit code for sending from potentiometer board. ](./pot_send_Huzzah32.txt) For Huzzah32 (Adafruit ESP32 Feather). [Receive code for servo board.](./servo_rec_Itsy.txt) Pins chosen for ItsyBitsy M4 board. Change CE and CS for other boards. ###Video of receiver servo. (transmitter in the next room) <video width="500" height="300" controls> <source src="radio_servo.mp4" type="video/mp4"> </video>