Assignment 12

Networking and Communications

The project for this week was to make two boards communicate to eachother in some way. Considering my final project is a remot control, I figured this would be the perfect opportunity to make a reciever and transmitter.
I decided to use the nRF24l01+ module for communication, as it is merely a radio, but can operate on a relatively large bandwidth and doesn't use lots of power (like some wifi modules). Luckily, these moudles also perfom nicely with the Arduino toolkit. The necessary library for RF24 can be found here. Make sure to install it in the Arduino software.
I looked at many Adruino-based tutorials on setting up communication between these two modules, but often more of them had more than was needed (connected servos and such). A great tutorial I found only sent small data packages back and forth, which is precisely the minimalist test I wanted. After looking at documentation and using their code, all I needed to do was hook up the wires correctly:
GND->GND
Vcc->3.3V
CE->D7
CSN->D8
SCK->D13
MOSI->D11
MISO->D12
IRQ->nothing
I actually struggled for a bit, as I think someone had previously fried one of my Arduinos. Another problem I had was getting both scripts to run on different ports on my one computer, but the trick is to open the source codes as separate files. But after doin that and trying new Arduino boards for the transmitter and reciever, I got the process to work. The transmitter sends out a random number to the reciever, where the number is added to one and sent back.
I will expand on this later for my final project, integrating this workflow into my own board and attached devices.