Playing with page structure
This commit is contained in:
parent
51ab3910ad
commit
cb5ac20889
|
@ -0,0 +1,11 @@
|
||||||
|
#Building the firmware
|
||||||
|
There are essentially three ways to build your NodeMCU firmware: cloud build service, Docker image, dedicated Linux environment (possibly VM).
|
||||||
|
|
||||||
|
##Cloud build serivce
|
||||||
|
NodeMCU "application developers" just need a ready-made firmware. There's a [cloud build service](http://nodemcu-build.com/) with a nice UI and configuration options for them.
|
||||||
|
|
||||||
|
##Docker image
|
||||||
|
Occasional NodeMCU firmware hackers don't need full control over the complete tool chain. They might not want to setup a Linux VM with the build environment. Docker to the rescue. https://hub.docker.com/r/marcelstoer/nodemcu-build/
|
||||||
|
|
||||||
|
##Linux build environment
|
||||||
|
NodeMCU firmware developers commit or contribute to the project on GitHub and might want to build their own full fledged build environment with the complete tool chain. http://www.esp8266.com/wiki/doku.php?id=toolchain#how_to_setup_a_vm_to_host_your_toolchain
|
|
@ -0,0 +1,55 @@
|
||||||
|
##node.restart()
|
||||||
|
####Description
|
||||||
|
restart the chip.
|
||||||
|
|
||||||
|
####Syntax
|
||||||
|
node.restart()
|
||||||
|
|
||||||
|
####Parameters
|
||||||
|
- `nil`
|
||||||
|
|
||||||
|
####Returns
|
||||||
|
- `nil`
|
||||||
|
|
||||||
|
####Example
|
||||||
|
|
||||||
|
```lua
|
||||||
|
node.restart();
|
||||||
|
```
|
||||||
|
|
||||||
|
## node.dsleep()
|
||||||
|
####Description
|
||||||
|
Enter deep sleep mode, wake up when timed out.
|
||||||
|
|
||||||
|
####Syntax
|
||||||
|
`node.dsleep(us, option)`
|
||||||
|
|
||||||
|
**Note:** This function can only be used in the condition that esp8266 PIN32(RST) and PIN8(XPD_DCDC aka GPIO16) are connected together. Using sleep(0) will set no wake up timer, connect a GPIO to pin RST, the chip will wake up by a falling-edge on pin RST.<br />
|
||||||
|
option=0, init data byte 108 is valuable;<br />
|
||||||
|
option>0, init data byte 108 is valueless.<br />
|
||||||
|
More details as follows:<br />
|
||||||
|
0, RF_CAL or not after deep-sleep wake up, depends on init data byte 108.<br />
|
||||||
|
1, RF_CAL after deep-sleep wake up, there will belarge current.<br />
|
||||||
|
2, no RF_CAL after deep-sleep wake up, there will only be small current.<br />
|
||||||
|
4, disable RF after deep-sleep wake up, just like modem sleep, there will be the smallest current.
|
||||||
|
|
||||||
|
####Parameters
|
||||||
|
- `us`: number(Integer) or nil, sleep time in micro second. If us = 0, it will sleep forever. If us = nil, will not set sleep time.
|
||||||
|
|
||||||
|
- `option`: number(Integer) or nil. If option = nil, it will use last alive setting as default option.
|
||||||
|
|
||||||
|
####Returns
|
||||||
|
- `nil`
|
||||||
|
|
||||||
|
####Example
|
||||||
|
|
||||||
|
```lua
|
||||||
|
--do nothing
|
||||||
|
node.dsleep()
|
||||||
|
--sleep μs
|
||||||
|
node.dsleep(1000000)
|
||||||
|
--set sleep option, then sleep μs
|
||||||
|
node.dsleep(1000000, 4)
|
||||||
|
--set sleep option only
|
||||||
|
node.dsleep(nil,4)
|
||||||
|
```
|
Loading…
Reference in New Issue