https://github.com/mcauser/esp8266-useless-throwie
ESP8266 Useless Throwie
https://github.com/mcauser/esp8266-useless-throwie
esp8266 grunt micropython nodejs svg throwie useless wemos-d1-mini
Last synced: 10 months ago
JSON representation
ESP8266 Useless Throwie
- Host: GitHub
- URL: https://github.com/mcauser/esp8266-useless-throwie
- Owner: mcauser
- License: mit
- Created: 2016-08-25T08:32:27.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2017-05-24T03:38:34.000Z (about 9 years ago)
- Last Synced: 2025-04-04T15:50:44.181Z (about 1 year ago)
- Topics: esp8266, grunt, micropython, nodejs, svg, throwie, useless, wemos-d1-mini
- Language: HTML
- Homepage:
- Size: 2.91 MB
- Stars: 13
- Watchers: 4
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license.txt
Awesome Lists containing this project
README
# ESP8266 Useless Throwie
An ESP8266 configured as an access point with a tiny web server which serves a page displaying a toggle switch, which flips a relay when clicked.

Precompiled [demo.html](https://raw.githubusercontent.com/mcauser/esp8266-useless-throwie/master/demo.html) can be [viewed here](https://mcauser.github.io/esp8266-useless-throwie/index.html) - just the button, finger and audio only.
## Install:
Install [node.js](http://nodejs.org) 5.12.0 or later.
Install [grunt](http://gruntjs.com/) task runner and dev dependencies listed in package.json
```
$ npm install -g grunt-cli
$ npm install
```
## Build:
Run grunt to compile each of the platforms into the `dist/` folder. This executes the default task defined in `Gruntfile.js`.
```
$ grunt
```
### Directories:
* /build - temporary dir used when compiling
* /dist - compiled files dir
* /src - source files dir
## Platform specific instructions:
Further instructions for configuring each device.
* [MicroPython](src/micropython/readme.md)
* [Arduino](src/arduino/readme.md)
* [Web](/src/web/readme.md)
## Development Notes:
### Arduino:
- [ ] web server
- [ ] web server with gzip
- [ ] captive portal
- [ ] is there an ino linter / testing framework?
### MicroPython:
- [x] web server
- [x] web server with gzip
- [ ] add to main.py
- [ ] captive portal
- [ ] websockets for bidirectional toggles
- [ ] multiple client/station bidirectional toggle support
- [ ] pylint
- [ ] precompiled firmware
### Web:
- [ ] css flexbox fallback
- [ ] css autoprefixer
- [ ] css rotate finger on swipe
- [ ] js tests
- [ ] js uglify mangle
- [ ] js touch support
- [ ] js add polyfills for old browsers
- [ ] js check if device can play mp3s
- [ ] js check if offline and skip XMLHttpRequests
- [ ] js cross platform event listeners
- [ ] js finger add rage personality
- [ ] js finger add preempt personality
- [ ] js on resize move finger offscreen
- [ ] grunt add imagemin for png
- [ ] svg reduce decimal places
- [ ] svg on state glow filter does not work in ios chrome
- [ ] svg randomise button led colour
- [ ] svg randomise skin tone
- [ ] svg adjust button shadow using device accelerometers
- [ ] svg switch animate rocker instead of duplicate button and shadow groups
- [ ] add easter eggs for excessive clickers
- [ ] deploy html to paas with MQTT or sockets bridge
### Common:
- [x] add photos
- [ ] grunt add concurrent
- [x] grunt add open
- [x] grunt add connect, watch, livereload
- [ ] MQTT publish
- [ ] swap relay for OLED, char LCD, buzzer, LED, WS2818, etc
## Links:
* [demo](https://mcauser.github.io/esp8266-useless-throwie/index.html)
* [WeMos D1 Mini](http://www.wemos.cc/Products/d1_mini.html)
* [WeMos D1 Mini Relay Shield](http://www.wemos.cc/Products/relay_shield.html)
* [micropython.org](http://micropython.org)
* [node.js](http://nodejs.org)
* [grunt](http://gruntjs.com/)
* [hackaday project](https://hackaday.io/project/13322-esp8266-useless-throwie)
## Credits:
* MicroPython socket web server examples based on [MicroPython examples](https://github.com/micropython/micropython/tree/master/examples/network).
* Python captive portal code based on [Mini Fake DNS server](http://code.activestate.com/recipes/491264-mini-fake-dns-server/).
* [easings.net](http://easings.net/) for the CSS Bezier curves