NodeMCU Projects: Difference between revisions
Content added Content deleted
Line 4: | Line 4: | ||
= Micropython = |
= Micropython = |
||
== Basics == |
|||
*Installing: |
*Installing: |
||
sudo pip install esptool |
sudo pip install esptool |
||
Line 19: | Line 22: | ||
import webrepl |
import webrepl |
||
webrepl.start() |
webrepl.start() |
||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
pin.on() |
|||
pin.off() |
|||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
toggle(pin) |
|||
⚫ | |||
⚫ | |||
<syntaxhighlight lang="python"> |
|||
import machine |
|||
import time |
|||
pin = machine.Pin(2, machine.Pin.OUT) |
|||
def toggle(p): |
|||
p.value(not p.value()) |
|||
while True: |
|||
⚫ | |||
time.sleep_ms(i) |
|||
toggle(pin) |
|||
</syntaxhighlight> |
|||
*Checking filesystem: |
*Checking filesystem: |
||
Line 81: | Line 51: | ||
print(ap.config('essid')); |
print(ap.config('essid')); |
||
== Projects == |
|||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||