Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

goodwid/button-api

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.
  3. Other accessories: breadboard, wires, at least one button.
board setup

On a breadboard, connect 3v and ground to the appropriate rails, then connect ground to button, then button to a GPIO pin (except pin 15 on Feather Huzzah, which has a built-in pulldown resistor and needs to be wired to the 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 configure
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.

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
Morty Proxy This is a proxified and sanitized view of the page, visit original site.