Coder Social home page Coder Social logo

noderocket-rocket's Introduction

noderocket-rocket

This is the control software for the noderockets water rocket.

Read more about it at http://www.noderockets.com/

This project uses a Raspberry Pi in a soda bottle water rocket to do the following:

  • Measure the altitude of the rocket.
  • Deploy a parachute soon after rocket apogee.
  • Take pictures/video during flight.

Preconfigured Image

We have an SD card image all ready for you that has all of this pre-configured. Download it here.

You need an SD card that's at least 4GB. Install the image to your SD card using the Raspbian installation instructions.

This image is configured to run the rocket and the camera software automatically on bootup.

Making Your Own

Install Raspbian

  1. You need an SD card that's at least 4GB.
  2. Download the base Raspbian distribution from http://www.raspberrypi.org/downloads/
  3. Install Raspbian to your SD card using these instructions
  4. Put the card in your Raspberry Pi.
  5. Plug the Pi into your network - it's already configured for DHCP.
  6. Connect the power to the Pi.
  7. If you have a monitor and keyboard connected to the Raspberry Pi you can login as user pi with password raspberry. Otherwise you can check your router for the Pi's IP address and connect vi ssh using the same user and password.

Install Prerequisites

  1. First update the OS:
sudo apt-get update
sudo apt-get upgrade
  1. Checkout and build pi-blaster. Pi-blaster enables PWM on the digital GPIO pins, making it possible to control a servo motor.
git clone https://github.com/sarfata/pi-blaster.git
cd pi-blaster
sudo make install

Pi-blaster will now start automatically on reboot.

  1. Enable the GPIO i2c modules. Edit /etc/modules:
sudo nano /etc/modules

You need to add these two entries to the file:

i2c-bcm2708
i2c-dev

Edit /etc/modprobe.d/raspi-blacklist.conf

sudo nano /etc/modprobe.d/raspi-blacklist.conf

You need to make sure the following entries are commented out in the file:

#blacklist spi-bcm2708
#blacklist i2c-bcm2708
  1. Download and install nodejs.
cd ~
sudo wget http://node-arm.herokuapp.com/node_latest_armhf.deb
sudo dpkg -i node_latest_armhf.deb
  1. Reboot
sudo reboot

Rocket Software

Clone and build the noderocket-rocket project:

git clone https://github.com/noderockets/noderocket-rocket.git
cd noderocket-rocket
npm install

This takes quite a while as it downloads and builds all of the dependencies.

You need to run the project as root for it to have access to the GPIO pins.

sudo node server.js

You can access the rocket UI by entering the Pi's IP address into your browser.

Make the rocket software run automatically

  1. Install forever globally:
sudo npm install -g forever
  1. Copy and install the init.d script to start and stop the rocket:
sudo cp etc/rocket /etc/init.d
sudo chmod +x /etc/init.d/rocket
sudo update-rc.d rocket defaults
  1. If you didn't clone the rocket project to /home/pi/noderocket-rocket, edit /etc/init.d/rocket and point ROCKET_HOME to the correct path.

Configuring the Camera

  1. Enable the camera by running:
sudo raspi-config

Follow the menu to enable the camera, then finish.

  1. Reboot the Pi.
  2. Install some packages:
sudo apt-get install libjpeg62-dev
sudo apt-get install cmake
  1. Clone and build the MJPG Streamer project. This is an experimental version that uses the raspicam input plugin.
git clone https://github.com/jacksonliam/mjpg-streamer.git
cd mjpg-streamer
sudo make install
  1. Run the streamer with this command:
mjpg_streamer -o "output_http.so -w /usr/local/www" -i "input_raspicam.so -fps 15 -q 50 -x 640 -y 480"

This will run the streamer with a frame rate of 15 and an image size of 640x480. This gives a pretty good result with low load on the Pi. You can look up the other input options at https://github.com/jacksonliam/mjpg-streamer.

  1. Open the streamer in your browser at the Pi's address, port 8080 - http://pi_address:8080

Make the camera software run automatically

  1. Copy and install the mjpg_streamer init.d script from the noderocket-rocket project to start and stop the camera:
sudo cp ~/noderocket-rocket/etc/mjpg_streamer /etc/init.d
sudo chmod +x /etc/init.d/mjpg_streamer
sudo update-rc.d mjpg_streamer defaults

noderocket-rocket's People

Contributors

numso avatar jribble avatar tvalletta avatar

Watchers

rosa maria palacios juncosa avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.