summaryrefslogtreecommitdiff
path: root/docs/wipy/quickref.rst
diff options
context:
space:
mode:
authordanicampora <daniel@wipy.io>2015-10-19 15:19:34 +0200
committerdanicampora <daniel@wipy.io>2015-10-19 21:17:15 +0200
commit36ae417c9f1417d65ca773d48a36589e300b4f71 (patch)
treeaa4960911fb560eb0df02fc6f8e39f0093723082 /docs/wipy/quickref.rst
parent2e0cd20a1d3c6ddfaf0bb6dafc823955858334a9 (diff)
docs: Add wipy and network.server documentation.
Diffstat (limited to 'docs/wipy/quickref.rst')
-rw-r--r--docs/wipy/quickref.rst30
1 files changed, 21 insertions, 9 deletions
diff --git a/docs/wipy/quickref.rst b/docs/wipy/quickref.rst
index c99671752..4ecffffe3 100644
--- a/docs/wipy/quickref.rst
+++ b/docs/wipy/quickref.rst
@@ -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:`network.server <network.server>` ::
+
+ from network import network
+
+ # 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 :ref:`machine.HeartBeat <machine.HeartBeat>`. ::
+See :mod:`wipy`. ::
- from machine import HeartBeat
+ import wipy
- # disable the heart beat indication (you are free to use this LED connected to GP25)
- HeartBeat().disable()
- # enable the heart beat again
- HeartBeat().enable()
+ wipy.heartbeat(False) # disable the heartbeat LED
+ wipy.heartbeat(True) # enable the heartbeat LED
+ wipy.heartbeat() # get the heartbeat state