GithubHelp home page GithubHelp logo

trevorjtclarke / button-api Goto Github PK

View Code? Open in Web Editor NEW

This project forked from goodwid/button-api

0.0 2.0 0.0 7 KB

ESP8266 w/ Espruino runtime sending GET requests to Express server.

License: MIT License

JavaScript 100.00%

button-api's Introduction

Button Press sends GET request to Express Server

This project will connect your controller to wifi, and connect to an Express server running on your computer,

Prerequisites
  1. You will need a supported ESP8266 microcontroller. Preconfigured boards, thus far, are:
  1. Your hardware should be flashed with ThingsSDK Flasher.js using the latest Espruino JS runtime.
  2. You should have ThingsSDK-cli installed.
board setup

On a breadboard, connect 3v and ground to the rails, then wire ground to button to pin (except pin 15 on Feather Huzzah, which has a built-in pulldown resistor and needs to be wired to 3v rail).

deploy

clone this repo, edit the skeleton.config.js to add your local environment information, then run the following:

npm i
npm run projectInit
thingssdk devices
npm run push

In another terminal, run node api to start the Express Server.

Now, press a button!

known issues
  • if you add debounce to the options object passed to setWatch, the e object passed to the handler function no longer contains the pin property.
known bugs
  • debouncing issues with pins other than 15 on Feather Huzzah. One press can get you multiple API calls.

button-api's People

Contributors

goodwid 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.