Download the OS image
Request the latest OS image for your Raspberry Pi Zero from Erle Robotics at:
It's a manual process, so expect to wait for a few hours or till the next business day to get a response. Be sure to enter the order number, which was issued to you when you purchased the unit from Erle.
Flash the OS to a uSD card
Follow the instructions on their site.
If you are on Mac:
# Find out you SD card device's name df -h # Unmount the whole disk (unlike BBB, you should unmount the whole disk). # Change it to fit your SD card device's name. diskutil unmount /dev/disk6 # Copy the disk image gunzip -c /path/to/downloaded/image.gz | sudo dd of=/dev/rdisk6 bs=8m
For initial setup, you need a HDMI monitor, a USB hub, a USB mouse, a USB keyboard, and a USB power source.
Insert uSD above to Pi Zero and boot by plugging it into a USB power source.
Click on a vehicle icon on the screen and it should configure itself. It should reboot into a console instead of GUI and you are ready.
NOTE: Since RPi Zero doesn't have a built-in WiFi (unlike RPi 3), remember to attach a Wifi USB dongle before booting. You probably need micro USB male to USB female adopter.
Connect via WiFi
ssh firstname.lastname@example.org # OR if you have rendezvous/zero-conf enabled and don't mind waiting for a while after boot: ssh email@example.com # password is holaerle
The image is the same for erle brain 2 and pxfmini and the hostname is set to "erle-brain-2" which is confusing as I also have ErleBrain 2.
sudo vi /etc/hostname
# Change hostname to pxfmini pxfmini
sudo vi /etc/hosts
Since my personal network is also 10.0.0.xxx, assign different network address
sudo vi /etc/network/interfaces
auto wlan0 iface wlan0 inet static address 10.10.10.1 network 10.10.10.0 netmask 255.255.255.0 broadcast 10.10.10.255
sudo vi /etc/hostapd/hostapd.conf
ssid=pxfmini hw_mode=g #2.4GHz channel=9 #2.4GHz
sudo vi /etc/dnsmasq.conf
If you change your network settings, you need to change
apm.sh in the home directory too.
# change wifi addresses in the following files. wifi="10.10.10.2:6000"
sudo vi ~/ros_catkin_ws/install_isolated/setup-mavros-bridge-wifi.bash
rosrun mavros mavros_node _fcu_url:="udp://:6001@" _gcs_url:="udp://192.168.7.1:firstname.lastname@example.org:6000"
# reboot to make these changes effective sudo shutdown -r now
Connnect from GCS
1) Connect to the wifi hotspot created on RPi Zero.
SSID: pxfmini (or whatever id you chose above) WiFi password: (whatever you specified above)
If you set it up correctly, it should assign you an IP address via DHCP. The WiFi hotspot is configured to accept only 1 client and all MAVLink packets will be forwarded there.
i.e. in my case, the
2) Add udp 6000 to your GCS connection
The JST GH connectors on PXFmini is different (reversed) from the other DroneCode boards. Pin #1 on GH connector should be VCC, but on current generation PXFmini, this is the GND. There's a small triangle indicating pin #1 on the backside (the other side from the locking tab) of the connector. DO NOT use cables from Pixracer and other manufacturers.
PixHack also uses JST GH connector, but with totally different pin layout than the rest of DroneCode cables, so keep them clearly labled and separated.
No buzzer/External LEDs.
- Use an I2C LED if you need externally visible LED.
- Use audio output of RPi Zero and write custom app if you need a buzzer.