Git Product home page Git Product logo

radio-raspberry's Introduction

About

Radio Raspberry is a radio that chooses tracks by placing fruit on the player. The player is powered by Raspberry Pi and works by detecting the color of the fruit. The application is written in Node.js.

Installation

As prerequisites, install nodejs and npm, as well as quick2wire-gpio-admin. We used a patched version of quick2wire-gpio-admin that works with Raspberry Pi 2.

See the /circuit folder for pictures of the circuit.

From your Raspberry Pi

git clone [email protected]:qvm1Wak/radio-raspberry.git
cd radio-raspberry
npm install
node app.js

At this point, lights should flash red, green, and blue in rapid succession and values should display on the terminal.

-c - calibration mode -- Calibrate the device for given lighting conditions by placing objects and reading the RGB values detected. Those values can then be entered into the app.js script. The calibration output shows three columns: RGB values detected, rgb 10% and 90% quantiles detected in the last 10 readings, and size of each of the ranges. This mode does not play songs or detect streaks of colors.
-d - debug mode -- Shows RGB information in the console during normal operation. The uncovered state shows as '.'.
-s - shortclip mode -- Don't play the whole song, just a 2 second clip. Useful if the songs become annoying.

This was tested on the latest Raspbian on Raspberry Pi 2. Raspberry Pi 2 did not work out of the box with node.js's pi-gpio library, so a patched one was required (the pi-gpio.js file). The project also used a patched version of quick2wire-gpio-admin (not included, compiled from source).

Credits

Radio Raspberry is a project by Madeira Interactive Technologies Institute and Carnegie Mellon Univeristy.

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.