Space Foundation Europa Drone
Control an underwater drone with a USB gamepad, designed for use in the Space Foundation Discovery Center's Mission To Europa interactive exhibit.
This project is still a work-in-progress. One of the biggest gaps at the moment is a need to tune values for each PWM hat and ECS as optimal settings per piece of hardware varies.
- Raspberry Pi (tested with Pi 3B)
- Adafruit 16-Channel PWM / Servo HAT for Raspberry Pi - Mini Kit
- (more soon)
More soon on this. Note: When plugging in servos or ESCs, make sure the ground/usually black/usually brown wire is on the bottom/out facing pin.
Download Raspbian (lite version) .zip at https://www.raspberrypi.org/downloads/ and unzip.
Insert the disk that will be used the Pi. Burn the downloaded image with Etcher, an app that makes burning images to disk simple.
Insert the prepared Micro SD card into the Pi. With a USB keyboard, HDMI to TV and Ethernet connection plugged in, plug in the power to boot up.
Configure the Pi with raspi-config.
It's important to change the password for security purposes. Choose "1 Change password for the current user", then "", then follow the prompts.
Change the hostname to something other than raspberrypi if connecting to the network (your IT team will thank you). Choose "2 Hostname", then enter a new name that describes this Pi e.g. "europa-drone-1".
Go back to the main screen and select "", then choose "" to reboot.
Update and upgrade apt-get which will be used to install needed software.
sudo apt-get update sudo apt-get upgrade
sudo apt-get install git
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash - sudo apt-get install -y nodejs
Configure i2c Communications
Follow these instructions to install and configure i2c requirements so that the Pi can communicate with the Pi servo hat. Some of the instructions won't match exactly e.g. commenting out something in a file with nothing to comment out and an old version of something not being supported, but it should work for this project:
TODO: Cover this in detail here.
TODO: Test i2c communications.
TODO: sudo apt-get install i2c-tools
TODO: sudo i2cdetect -y 1
Install Project Code
Install this project to the Pi.
cd ~ git clone https://github.com/owntheweb/europa-drone.git cd europa-drone npm install
Run the following:
Start Script On Boot
Edit startup script to run loop that keeps the node script running indefinitely on boot, restarting if it crashes.
sudo nano /etc/rc.local
Add this before the "exit 0" line:
(runuser -l pi -c '/bin/bash /home/pi/europa-drone/bash/loop.bash')&
Restart the Pi. After it is booted, the script should running.
To Be Continued...
Testing notes need to be added. Hardware setup is still being worked out. Anything else missing will be added as available.