From 6e406a8ec3e35c70b04f963033d9d3ae102b3ef1 Mon Sep 17 00:00:00 2001 From: Alexandre B Date: Mon, 5 May 2025 20:00:33 -0400 Subject: [PATCH] Update index.md --- index.md | 45 +++++++++++++++++++++++++++++++++++++-------- 1 file changed, 37 insertions(+), 8 deletions(-) diff --git a/index.md b/index.md index 9a68706..8319db3 100644 --- a/index.md +++ b/index.md @@ -6,12 +6,41 @@ title: "ESP32-C3 Breadboard Adapter" {{ page.title }} ================ -Schematic +``` python +import esp, esp32, time, os, _thread +from machine import Pin, SoftI2C - \ No newline at end of file +# An infinite loop thread to blink LED +def status_led(): + # Blink pattern blink-blink-pause + while True: + led.value(1) + time.sleep_ms(250) + 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() +```