docs: Add wipy and network.server documentation.

This commit is contained in:
danicampora
2015-10-19 15:19:34 +02:00
parent 2e0cd20a1d
commit 36ae417c9f
8 changed files with 95 additions and 27 deletions

View File

@@ -119,9 +119,10 @@ The heart beat LED
------------------
By default the heart beat LED flashes once every 4s to signal that the system is
alive. This can be overridden through the HeartBeat class:
alive. This can be overridden through the :mod:`wipy` module::
``machine.HeartBeat().disable()``
import wipy
wipy.heartbeat(False)
There are currently 2 kinds of errors that you might see:

View File

@@ -10,7 +10,7 @@ Quick reference for the WiPy
General board control (including sleep modes)
---------------------------------------------
See :mod:`machine`. ::
See the :mod:`machine` module::
import machine
@@ -198,14 +198,26 @@ See :ref:`network.WLAN <network.WLAN>` and :mod:`machine`. ::
machine.sleep()
# now, connect to the FTP or the Telnet server and the WiPy will wake-up
Heart beat LED
--------------
Telnet and FTP server
---------------------
See :ref:`machine.HeartBeat <machine.HeartBeat>`. ::
See :ref:`network.server <network.server>` ::
from machine import HeartBeat
from network import network
# disable the heart beat indication (you are free to use this LED connected to GP25)
HeartBeat().disable()
# enable the heart beat again
HeartBeat().enable()
# init with new user, pass word and seconds timeout
server = server.init(login=('user', 'password'), timeout=60)
server.timeout(300) # change the timeout
server.timeout() # get the timeout
server.isrunning() # check wether the server is running or not
HeartBeat LED
-------------
See :mod:`wipy`. ::
import wipy
wipy.heartbeat(False) # disable the heartbeat LED
wipy.heartbeat(True) # enable the heartbeat LED
wipy.heartbeat() # get the heartbeat state