Wireless Chat using NRF24L01+ 2.4GHz RF Transceiver on Arduino & Raspberry Pi Ubuntu Linux
After a bit of success implementing an Arduino 2.4GHz Transceiver , I was encouraged to explore a more familiar environment, something with Python and Linux in the mix.
After a short period of research I landed on the circuitpython-nrf24l01 pypi project page, and quickly began digging through their examples .
It wasn’t long after I had a working prototype that mirrored my Arduino code quite closely:
Components CanaKit Raspberry Pi Zero W (Wireless) Complete Starter Kit - 16 GB Edition RF24L01+ 2.
Wireless Chat using Arduino & NRF24L01+ 2.4GHz RF Transceiver
It has been quite some time since I’ve tinkered with an Arduino, and this go around I decided to learn something new.
The [NRF24L01](http://amzn.to/3iFalxX(opens in a new tab)) 2.4GHz Transceiver is an extremely affordable wireless chip, I managed to pickup 10 units for around $12. This chip allows sending and receiving on the 2.4GHz wireless band .
Lucky for us there is a great Arduino library just waiting to be imported, thanks maniacbug !
Arduino values to Python over Serial
I’ve done a little bit of reading on the ReadAnalogVoltage of Arduino’s home page, and they give a straight forward way to read voltage from an analog pin.
I wanted to take this one step further and send the value over serial, then read it in Python using pySerial .
My setup is very straight forward, I have a Arduino UNO , a bread board, and a battery pack holding 4x AA batteries: To start out I want to merely print the voltage value in Arduino Studio to the serial console, my code looks something like this:
Arduino meet Raspberry Pi
While at the electronics store the other day, I noticed they had motion detectors on sale for only $4. I decided with my latest obsession of electronic tinkering, picking up a OSEEP Passive Infrared Sensor (PIR) Module might be fun.
I guess I should have done a little more reading on the packaging; by the time I was home, I noticed this sensor reported in analog , not digital. This was an issue as the Raspberry Pi only reads digital input.