Giter Site home page Giter Site logo

imclab / raspberry-pi-time-weather-demo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from watson-developer-cloud/raspberry-pi-time-weather-demo

0.0 2.0 0.0 1.65 MB

IoT Demo: Use the IBM Watson Speech to Text service to make a Raspberry Pi speak the current time and weather

License: MIT License

Shell 49.19% JavaScript 50.81%

raspberry-pi-time-weather-demo's Introduction

Watson Time and Weather Speech Demo

Uses a Raspberry Pi and IBM Watson to speak the current time and weather.

Also see https://github.com/watson-developer-cloud/raspberry-pi-speech-to-text for an example of using Speech to Text on a Raspberry Pi.

assembled system

Setup

Requires Node.js, tested on v0.12.2 and v4.2.0. (For a Pi v1, you'll want the armv6l release, for a pi v2, you'll want the armv7l release). Also requires a Raspberry Pi, tested on 256/128mb Model B's but should also work on newer ones.

Download the code and run npm install to fetch dependencies.

Next you'll need to get credentials by creating Text to Speech service instance on bluemix and binding it to a server. The credentials may go into environment properties, a .env file, or just edit index.js.

The script expects an LED on pin 17 and a button on pin 4. You'll need a pulldown resistor on the button (2.2k worked well for me), and you may want current-limiting resistors on both the LED and the button (I'm using 330โ„ฆ).

Note: the script automatically reports the current time and weather at startup, so you can test it even without the extra hardware.

breadboard

Run npm start to start the app, or use the included init.d script to run as a daemon.

For the dameon:

  1. Ensure the DAEMON and DAEMON_ARGS paths are correct
  2. sudo cp etc-init.d/time-weather /etc/init.d # copy the script to the init.d folder where startup scripts are kept
  3. sudo chmod +x /etc/init.d/time-weather # ensure it's executable
  4. sudo update-rc.d time-weather defaults # enable it
  5. Reboot your Pi

raspberry-pi-time-weather-demo's People

Contributors

germanattanasio avatar nfriedly avatar

Watchers

 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.