Posts

Setup the development environment

Setup development environment Set up NodeJS 8 LTS and npm First, to make things clean:    sudo apt-get update You can't install Node using apt-get; try it to see the error if you like. You  can  install directly from ARMv6 binaries on the Node site. cd ~/Downloads wget https://nodejs.org/dist/v8.11.3/node-v8.11.3-linux-armv6l.tar.xz tar -xvf node-v8.11.3-linux-armv6l.tar.xz cd node-v8.11.3-linux-armv6l sudo cp -R bin include lib share /usr/local/ `which node` --version Now logout and login again. Set up git Git already exists on the Pi so just update it to the latest. sudo apt-get install git Add in missing packages we'll need for BLE These system packages are prerequisites of  noble npm package for BLE: sudo apt-get install bluetooth bluez libbluetooth-dev libudev-dev May also want to run BLE manipulation as non-root user, so we need setcap : sudo apt-get install libcap2-bin Then we can run it: sudo setcap cap_net_raw+eip ...

Setup the platform

Setting up the Pi Zero W for basic access Connect the Pi to a monitor. It's DVI out of the Pi so an adapter cable may be needed. Connect a keyboard and mouse. There's only one USB port on the Pi so you'd probably need a hub. But an unpowered hub won't work because the Pi is under-powered by default. In any case we want the CLI so we only need a keyboard. So: Boot with the mouse attached Click the Raspberry (top left);  Preferences , Raspberry Pi Configuration . Choose To CLI and click the OK button. Shutdown (via the Raspberry menu), then swap in the keyboard . Boot (power-cycle). Configure WiFi To scan for networks:  sudo iwlist wlan0 scan | grep ESSID: Look for your ESSID and remember it. Now edit /etc/wpa_supplicant/wpa_supplicant.conf If it's not obvious to you, there are full instructions  here . Then reboot Enable SSH sudo raspi-config . Click  Interfacing Options . Navigate to and click  SSH . Click ...