Skip to content

Commit

Permalink
Fix repl code in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
rroemhild committed Mar 12, 2018
1 parent 842f8aa commit c207444
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,23 +30,23 @@ Setup WIFI for installation

Microhomie handles WIFI setup for you, but for installation from PyPi you have to manual setup WIFI once from REPL.

>>> import network
>>> wlan = network.WLAN(network.STA_IF)
>>> wlan.active(True)
>>> wlan.connect('wifi-name', 'wifi-secret')
# wait a few seconds
>>> wlan.isconnected() # test if wlan is connected
True
>>> wlan.ifconfig() # get wlan interface config
('192.168.42.2', '255.255.255.0', '192.168.42.1', '192.168.42.1')
>>> import network
>>> wlan = network.WLAN(network.STA_IF)
>>> wlan.active(True)
>>> wlan.connect('wifi-name', 'wifi-secret')
# wait a few seconds
>>> wlan.isconnected() # test if wlan is connected
True
>>> wlan.ifconfig() # get wlan interface config
('192.168.42.2', '255.255.255.0', '192.168.42.1', '192.168.42.1')

Install from PyPi
~~~~~~~~~~~~~~~~~

We provide PyPi packages for easier installation on your device. Open the REPL from your device, make sure your device wlan is up and your device has access to the internet, import upip and install microhomie:

>>> import upip
>>> upip.install('microhomie')
>>> import upip
>>> upip.install('microhomie')

Manual copy the files
~~~~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -108,8 +108,8 @@ We provide some example nodes in the `microhomie-nodes <https://github.com/micro

You can also install nodes from PyPi:

>>> import upip
>>> upip.install('microhomie-nodes-dht22')
>>> import upip
>>> upip.install('microhomie-nodes-dht22')


Local Development setup
Expand Down

0 comments on commit c207444

Please sign in to comment.