Last active
December 19, 2021 08:51
-
-
Save sam210723/53b72a64f087fc20f7b5a6c13ac04933 to your computer and use it in GitHub Desktop.
Setup nRF24L01 and nerfnet on Raspberry Pi Zero W (Raspbian Buster)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Prepare for installation | |
cd ~ | |
mkdir nrf | |
cd nrf | |
sudo apt update | |
sudo apt install -y git cmake build-essential libtclap-dev | |
echo "Enable SPI in raspi-config" | |
sudo raspi-config | |
# Install RF24 library | |
wget http://tmrh20.github.io/RF24Installer/RPi/install.sh | |
chmod +x install.sh | |
./install.sh | |
# Install nerfnet | |
git clone https://github.com/aarossig/nrfnet | |
ln -s ~/nrf/rf24libs/RF24 ~/nrf/nrfnet/nerfnet | |
cd nrfnet | |
mkdir build | |
cd build | |
cmake .. | |
make | |
sudo cp nerfnet/net/nerfnet /usr/local/bin | |
cd ../.. | |
sudo nerfnet --primary --channel 2 --ce_pin 23 | |
sudo nerfnet --secondary --channel 2 --ce_pin 23 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment