Search found 35 matches

by ihornehrutsa
Fri Nov 10, 2023 8:04 pm
Forum: General Discussion and Questions
Topic: Properly checking for errors during a WiFi connection?
Replies: 13
Views: 16932

Re: Properly checking for errors during a WiFi connection?

esp32/network_wlan: Fix network.WLAN.status().
https://github.com/micropython/micropython/pull/12932

status() can return STAT_NO_AP_FOUND and STAT_WRONG_PASSWORD.
This allows users to set the correct credentials.
by ihornehrutsa
Fri Feb 03, 2023 10:55 am
Forum: Programs, Libraries and Tools
Topic: Anyone using python websockets to connect to WebREPL?
Replies: 6
Views: 25159

Re: Anyone using python websockets to connect to WebREPL?

# websocket_REPL_test.py # Install websocket-client: # pip install websocket-client CRLF = b"\r\n" command = b''' 1+1 2+2 ''' PASS = b'' + CRLF IP = '172.16.11.51' import websocket import _thread import time in_message = '' def on_message(ws, message): print(message, end='') def on_error(ws, error)...
by ihornehrutsa
Wed Nov 17, 2021 7:47 am
Forum: Programs, Libraries and Tools
Topic: Minimal code REPL and WebREPL examples
Replies: 2
Views: 2048

Re: Minimal code REPL and WebREPL examples

More comprehensive WebSocket based code from Aivar Annamaa at https://forum.micropython.org/viewtopic.php?f=2&t=3124&p=28051&hilit=REPL+serial.Serial+close#p28051 import websocket import threading from time import sleep def on_message(ws, message): print(message, end="") def on_close(ws): print("###...
by ihornehrutsa
Mon Nov 15, 2021 10:04 pm
Forum: Programs, Libraries and Tools
Topic: Minimal code REPL and WebREPL examples
Replies: 2
Views: 2048

Re: Minimal code REPL and WebREPL examples

Micropython device is connected to a local Wi-Fi network. IP address: 192.168.0.200. WebREPL is started. Windows PC IP address: 192.168.0.101 Connect to Micropython device WebREPL via WebSocket (Windows PC Python version): # websocket_REPL_test.py ''' pip install websocket-client if ImportError: can...
by ihornehrutsa
Mon Nov 15, 2021 9:37 pm
Forum: Programs, Libraries and Tools
Topic: Minimal code REPL and WebREPL examples
Replies: 2
Views: 2048

Minimal code REPL and WebREPL examples

Connect to Micropython device via serial port (Windows PC Python version): # serial_REPL_test.py port = "COM7" CRLF = b"\r\n" command = CRLF + b"1+1" + CRLF + b"2+2" + CRLF + b"3+3" + CRLF from time import sleep import serial s = serial.Serial(port, 115200, timeout=1) s.write(command) sleep(1) while...
by ihornehrutsa
Thu Sep 09, 2021 5:06 pm
Forum: ESP8266 boards
Topic: Timer issues
Replies: 2
Views: 3821

Re: Timer issues

Add WDT.deinit() method #7766
https://github.com/micropython/micropython/issues/7766

ESP32/machine_wdt.c: Add WDT.deinit() method. #6631
https://github.com/micropython/micropython/pull/6631
by ihornehrutsa
Thu Sep 09, 2021 5:04 pm
Forum: General Discussion and Questions
Topic: Use WDT using ESP8266
Replies: 4
Views: 5119

Re: Use WDT using ESP8266

Add WDT.deinit() method #7766
https://github.com/micropython/micropython/issues/7766

ESP32/machine_wdt.c: Add WDT.deinit() method. #6631
https://github.com/micropython/micropython/pull/6631
by ihornehrutsa
Tue Jun 22, 2021 6:20 am
Forum: ESP32 boards
Topic: ESP32 CAN bus
Replies: 3
Views: 9100

Re: ESP32 CAN bus