idIoT is an IoT environment based on NodeMCU + ESP8266. NodeMCU is an open-source firmware and development kit that helps you to prototype your IoT product within a few Lua script lines.
idIoT tries to make NodeMCU environment easier to develop using MoonScript and the idiot framework.
idIoT uses MoonScript to make coding easier for NodeMCU development.
Writing a blinking LED is THAT easy:
every second!, -> toggle pin 4
Or listening a button press:
led = pin 0
on button(5), (pressed)-> toggle led, to: pressed
Or you can descriptively create a buzzer beeper:
buzzer = pin 1
beep = -> close pin 1, for: seconds(1)
First, you need to download SiLabs Serial Driver to connect, send and receive data from/to NodeMCU.
brew install lua # Install Lua via Homebrew
sudo easy_install pip # You need to have Python PIP
pip install esptool # Install ESPTool to interact with NodeMCU
luarocks install moonscript --local # Install MoonScript
idIoT is where the magic starts:
git clone http://github.com/f/idiot.git
cd idiot
make install
cjson
cron
encoder
enduser_setup
file
gpio
mdns
net
node
tmr
uart
websocket
wifi
To bundle more modules, please use NodeMCU Builder.
Please replace firmware/firmware.bin
with if you build custom firmware.
Run following command to install new firmware.
make reset
make
Idiot has simplified API to take control of your board.
every second!, -> toggle pin 4
wait second!, -> open pin 4
second! -- 1 second
second(0.5) -- half second
second 2 -- 2 seconds
MIT