mirror of
https://github.com/alexandrebobkov/ESP32-C3_Breadboard-Adapter.git
synced 2025-08-06 19:05:05 +00:00
Update index.md
This commit is contained in:
45
index.md
45
index.md
@@ -6,12 +6,41 @@ title: "ESP32-C3 Breadboard Adapter"
|
|||||||
{{ page.title }}
|
{{ page.title }}
|
||||||
================
|
================
|
||||||
|
|
||||||
<a href="{{% link schematic.md %}}">Schematic</a>
|
``` python
|
||||||
|
import esp, esp32, time, os, _thread
|
||||||
|
from machine import Pin, SoftI2C
|
||||||
|
|
||||||
<ul>
|
# An infinite loop thread to blink LED
|
||||||
{% for post in site.posts %}
|
def status_led():
|
||||||
<li>
|
# Blink pattern blink-blink-pause
|
||||||
<a href="{{ post.url }}">{{ post.title }}</a>
|
while True:
|
||||||
</li>
|
led.value(1)
|
||||||
{% endfor %}
|
time.sleep_ms(250)
|
||||||
</ul>
|
led.value(0)
|
||||||
|
time.sleep_ms(250)
|
||||||
|
led.value(1)
|
||||||
|
time.sleep_ms(250)
|
||||||
|
led.value(0)
|
||||||
|
time.sleep_ms(750)
|
||||||
|
|
||||||
|
def connect_wifi():
|
||||||
|
import network
|
||||||
|
wlan = network.WLAN(network.WLAN.IF_STA)
|
||||||
|
wlan.active(True)
|
||||||
|
if not wlan.isconnected():
|
||||||
|
print('connecting to network...')
|
||||||
|
wlan.connect('IoT_bots', '208208208')
|
||||||
|
while not wlan.isconnected():
|
||||||
|
pass
|
||||||
|
print('Network Config:', wlan.ipconfig('addr4'))
|
||||||
|
|
||||||
|
# Display information about ESP32S3 module
|
||||||
|
print("=====================================\n")
|
||||||
|
print(os.uname())
|
||||||
|
print("\n=====================================")
|
||||||
|
print("Flash size: ", esp.flash_size()/1024/1024, "Mb")
|
||||||
|
#rint("MCU Temperature: ", esp32.mcu_temperature(), "C")
|
||||||
|
print("MCU Temperature: {:4.1f} C".format(esp32.mcu_temperature()))
|
||||||
|
|
||||||
|
connect_wifi()
|
||||||
|
```
|
||||||
|
Reference in New Issue
Block a user