https://github.com/orangecms/blinkyfoo
Blinkyfoo scripts for NodeMCU
https://github.com/orangecms/blinkyfoo
Last synced: about 1 year ago
JSON representation
Blinkyfoo scripts for NodeMCU
- Host: GitHub
- URL: https://github.com/orangecms/blinkyfoo
- Owner: orangecms
- License: gpl-3.0
- Created: 2017-08-27T15:53:09.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-08-27T16:13:05.000Z (almost 9 years ago)
- Last Synced: 2025-01-24T10:25:12.723Z (over 1 year ago)
- Language: Lua
- Size: 15.6 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# blinkyfoo
Blinkyfoo scripts for [NodeMCU](http://www.nodemcu.com/index_en.html)
## Putting the scripts on an ESP8266 board running NodeMCU
You can use
[nodemcu-tool](https://nodemcu.readthedocs.io/en/master/en/upload/#nodemcu-tool)
to upload the scripts:
```sh
nodemcu-tool upload blinky.lua
nodemcu-tool upload hotspot.lua
nodemcu-tool upload init.lua
nodemcu-tool reset
```
By uploading the `init.lua` script, the device will automatically run the other
scripts after reset, or when you turn it on again.
When starting, it will put the `D3` pin to `HIGH`. This is where you can wire
up an LED. For now, this is the only pin used; it's straight-forward to extend
the code and use other pins as well. I am doing this in a related project, but
want to keep it rather simple here.
There will be a Wi-fi hotspot with both the SSID and password being `blinkyfoo`.
You can connect to it and then send commands via TCP to the IP address
`192.168.4.1` on port `1337`.
On UNIX-like systems, you can use `nc`. On Android, you can use the app
[TCP Client](https://play.google.com/store/apps/details?id=com.sollae.eztcpclient&hl=en)
Example:
```sh
🐢 nc 192.168.4.1 1337
nc: using stream socket
Hello! I am Blinkyfoo. :)
Send on or off to control the LEDs.
To quit, send bye. Have fun!
off
on
off
bye
```
## Demo
Check out [this video](https://www.youtube.com/watch?v=d1T1iyMFUbg).