Skip to content

Instantly share code, notes, and snippets.

@sam210723
Last active December 19, 2021 08:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sam210723/53b72a64f087fc20f7b5a6c13ac04933 to your computer and use it in GitHub Desktop.
Save sam210723/53b72a64f087fc20f7b5a6c13ac04933 to your computer and use it in GitHub Desktop.
Setup nRF24L01 and nerfnet on Raspberry Pi Zero W (Raspbian Buster)
#!/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