The subject of this post is a project I am involved in Makespace Madrid with some friends.
Our idea is to create a minimal Arduino-like board with wireless connection in. The project is being documented on the Makespace wiki (in Spanish). Basically we took an Atmega328p (the heart of Arduino Uno) with no strings attached and connected to a nRF24L01+, a super cheap, super low-cost 2.4GHz digital transceiver. The Atmega alone can be used as an Arduino, but at 8MHz. This post explains how to do it in detail.
The connection between the Atmega and the RF board follows the instructions given in this post:
- PD2 -> IRQ
- PB0 -> CS
- PB5 -> SCK
- PB4 -> MISO
- PB3 -> MOSI
- PB1 -> CE
- GND -> GND
- VCC -> VCC
I have also added a RGB LED to three pins of the Atmega with PWM.
As software, you will need a library that implements the communication with the RF chip (it works with SPI). I have tried the Maniacbug’s library RF24, but, a part from the basic examples that come with the library, I was not able to make my own wireless controller. I even tried some forks of the same library as suggested by Matthias Hertel in his post but wasn’t successful. I then tried the library provided by Mike McCauley here, and it worked very well at the first try!
As a demo I have created a simple sketch that can work in two ways: as a “client” that receives simple messages composed of 3 bytes, one per each color (RGB), and switches the LED on accordingly, and a “remote control” that reads these values from the serial connection or from three potentiometers and sends them. The code is available in my repository here.
Below you can see a video of the demo, the “client” is my prototype board with the LED and the “remote control” is a normal Arduino connected to a nRF24L01 and 2 potentiometers (I didn’t have a third one available !!).