Giter Club home page Giter Club logo

gongpi's Introduction

gongpi

GongPi

Rings the gong in the Envoy office every time we make a sale.

DEMO

Requirements

  • RPi GPIO library
  • PIGPIO library
  • Web.py
  • Raspberry Pi (we used Adafruit Raspberry Pi Rev. B+)
  • Internet connection (wired or wireless)
  • Servo on GPIO pin 4
  • One LED on GPIO pin 22

Instructions

Note: These are very loose instructions to help get you started. This guide won't cover the basics of electronic wiring, Raspbian (the Raspberry Pi flavored Linux distro), and setting up a server to send webhooks from.

  1. Install Raspbian Wheezy – I recommend using NOOBS (linked) because it's easier.
  2. Use the raspi-config menu to change the default password and set your time zone. Don't skip this step.
  3. Once at the command prompt, run apt get update and apt-get upgrade to update your base system.
  4. Run apt-get install git
  5. Clone the repo git clone [email protected]:envoy/gongpi.git
  6. sudo mv rc.local /etc/rc.local – this overwrites the default rc.local with one that runs the required scripts on boot.
  7. Install PIGPIO – this gives us a Python library to easily control the servo.
  8. easy_install web and easy_install simplejson
  9. Try running sudo python stripe.py – it should return the following:
http://0.0.0.0:8080/
_

If so, your webserver is now running and listening for incoming webhooks. You can test if incoming webhooks are correctly interprereted by running the following from your machine (not the Pi):

curl -d '{"type":"charge.succeeded"}' [PI's IP ADDRESS]:8080

The LED should start blinking, and your servo should activate. stripe.py will print text in the console, and output an access log to stripe.log.

  1. Restart your Pi sudo shutdown -r now
  2. When the Pi reboots, it will automatically start the network monitor (which will auto-reconnect WiFi if disconnected), pigpiod, and the stripe.py server.

gongpi's People

Contributors

wr avatar alexbaldwin avatar

Stargazers

Luis Felipe Hernandez avatar  avatar Saxon Jensen avatar Owen Hael avatar Ross avatar Abdullah Barrak avatar Jim Kane avatar Gary Ferguson avatar Denise LoBue avatar Mahesh Murthy avatar  avatar Chima Atufunwa avatar  avatar Danny Nemer avatar Patrick avatar Chris avatar Jonathan Irwin avatar  avatar

Watchers

Mihai Anca avatar Rael Dornfest avatar Fabien avatar Bill Heaton avatar Dave Kroondyk avatar Jeremy Green avatar Will Bagby avatar Linmiao Xu avatar Mike Chan avatar Alexandru Ifrim avatar Eric Kelly avatar J P avatar James Cloos avatar  avatar Dana Franklin avatar Lisa Sheridan avatar Nealon Young avatar Robin Goos avatar  avatar Ryan LaBouve avatar Jon Rundle avatar Anton Vakulchyk avatar Benny Wong avatar Seth Sakamoto avatar Becky Christensen avatar  avatar Caleb Harrison avatar Ben Angel avatar Tina Huang avatar Brian Ko avatar Michael Gallagher avatar Willy Xiao avatar Alice Huang avatar Doug avatar Ani Agajanyan avatar Ben Hu avatar Yen avatar Kern Jackson avatar Alex avatar Steve Szczecina avatar Evin Colignon avatar yohanmishkin avatar Dušan Terzić avatar Dana Stocking avatar Rosie avatar Lei Zhao avatar  avatar Dorian Čizmar avatar JunGwon Kim avatar  avatar Envoy Bot avatar MilanMijic6 avatar  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.