Giter VIP home page Giter VIP logo

ng2-simon's Introduction

ng2-simon

A Universal Simon game written in Angular 2.

It runs on the web browser, on Arduino and also on the Raspberry PI using angular2-iot.

โžก Learn how to works and how you can build your own version

Live Demo (browser)

Go to the online version

Running in a Web Browser

npm install
npm start

Then go to http://localhost:3000 in your browser.

Running on Raspberry Pi

Hardware Assembly

  1. Connect 4 push-buttons, one button between each of pins GPIO-13, GPIO-26, GPIO-16, GPIO-21 and the ground
  2. Connect 4 colored LEDs, one LED between each of pins GPIO-6, GPIO-19, GPIO-12, GPIO-20 and the ground. It is also recommended to add a 100ohm current limiting resistor in series with each LED.
  3. Connect a speaker to the Raspberry PI audio jack
  4. Optionally, connect a Serial 7-Segment Display to the I2C pins of the Raspberry Pi: connect GPIO-2 to SDL and GPIO-3 to SCL

Simon on Raspberry Pi Hardware Diagram

Running the game

Run the following command on the Raspberry pi terminal / console:

  1. Make sure you have the sox and mpg123 packages installed: sudo apt-get install sox mpg123
  2. Build the project using npm run build:iot
  3. Run it using sudo npm run iot

Running on Arduino

Hardware Assembly

  1. Connect 4 push-buttons, one button between each of Arduino pins 2, 3, 4, 5 and the ground
  2. Connect 4 colored LEDs, one LED between each of Arduino pins 9, 10, 11, 12 and a current limiting resistor connected to the ground. 220ohm is a good value for the resistor.
  3. Optionally, connect a small speaker between pin 8 and the ground

Simon on Arduino Hardware Diagram

Running the game

  1. Connect the Arduino board to your computer
  2. Upload the StandardFirmata firmware firmware to your Arduino board
  3. Build the project using npm run build:iot
  4. Run it using npm run iot

ng2-simon's People

Contributors

tomteman avatar urish avatar

Watchers

 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.