Search found 49 matches

by DJShadow1966
Fri Apr 03, 2020 3:02 pm
Forum: MicroPython pyboard
Topic: [Solved] Pin.mode() throwing TypeError
Replies: 4
Views: 107

Re: Pin.mode() throwing TypeError

Hello

Wouldnt it be

Code: Select all

pir = Pin('X1', Pin.IN)
regards Mike
by DJShadow1966
Sun Mar 15, 2020 5:05 pm
Forum: ESP32 boards
Topic: ESP32 connected local Wi-FI how to get it's IP using socket
Replies: 4
Views: 308

Re: ESP32 connected local Wi-FI how to get it's IP using socket

Hello You can set the hostname as an example this is what I use :- import network, ntptime, utime, machine sta_if = network.WLAN(network.STA_IF) sta_if.active(True) sta_if.config(dhcp_hostname="ResetTest") sta_if.connect('ssid', 'password') print("Connecting ") while not sta_if.isconnected(): print(...
by DJShadow1966
Fri Mar 13, 2020 1:21 pm
Forum: ESP32 boards
Topic: Problem with machine.reset
Replies: 8
Views: 449

Re: Problem with machine.reset

Hello I have done a bit more testing and from what it looks like is that IDF 4.x builds of Micropython do not like the command "sta_if.config(dhcp_hostname="TestEnviron")" when the device is reset by whatever means you do i.e. Grounding the ENable pin, pressing the reset button, or even with the com...
by DJShadow1966
Fri Mar 13, 2020 6:51 am
Forum: ESP32 boards
Topic: Problem with machine.reset
Replies: 8
Views: 449

Re: Problem with machine.reset

Hello

Tried commenting the line out then the error of OSError: TCP/IP IF Not Ready drops down too sta_if.connect('*******', '********')

Regards Mike
by DJShadow1966
Thu Mar 12, 2020 9:19 pm
Forum: ESP32 boards
Topic: Problem with machine.reset
Replies: 8
Views: 449

Re: Problem with machine.reset

Hello Yeah that was my thought of adding a sleep_ms of various sizes before hand and still get the same error, and have edited my credentials as forgot them as was so caught up in troubleshooting the issue. It seems strange that the same code works fine on the same ESP32 but using IDF 3 instead of I...
by DJShadow1966
Thu Mar 12, 2020 2:22 pm
Forum: ESP32 boards
Topic: Problem with machine.reset
Replies: 8
Views: 449

Problem with machine.reset

Hello I have a problem with machine.reset when using an interupt to trigger the command machine.reset, the macine resets then I get the error File "main.py", line 4, in <module> OSError: TCP/IP IF Not Ready MicroPython v1.12-256-geae495a71 on 2020-03-12; ESP32 module with ESP32 Type "help()" for mor...
by DJShadow1966
Mon Feb 24, 2020 1:29 pm
Forum: General Discussion and Questions
Topic: [resolved]change name esp32 expressif
Replies: 2
Views: 158

Re: change name esp32 expressif

Hello Yes you can change the hostname this is what I use. import network, ntptime, utime, machine sta_if = network.WLAN(network.STA_IF) sta_if.active(True) # Next Line changes the hostname. sta_if.config(dhcp_hostname="ComputerTest2") sta_if.connect('*****', '*****') print("Connecting ") while not s...
by DJShadow1966
Wed Feb 19, 2020 7:27 am
Forum: ESP32 boards
Topic: ESP32 and MQTT
Replies: 9
Views: 497

Re: ESP32 and MQTT

Hello On the code there currently is only one sensor that does humidty and Temperature, the code is part of my master code for multiple ESP32's dotted around my house thats why I have #ed out some code, it is still a work in progress. If I get some free time today I am going to be working on it to s...
by DJShadow1966
Wed Feb 19, 2020 6:11 am
Forum: ESP32 boards
Topic: ESP32 and MQTT
Replies: 9
Views: 497

Re: ESP32 and MQTT

Hello Here is some code I use - First off all my main.py import network, ntptime, utime, machine sta_if = network.WLAN(network.STA_IF) sta_if.active(True) sta_if.config(dhcp_hostname="ComputerTest2") sta_if.connect('SSID', 'password') print("Connecting ") while not sta_if.isconnected(): print(".", e...
by DJShadow1966
Tue Feb 18, 2020 5:39 pm
Forum: ESP32 boards
Topic: ESP32 and LCD1602 with I2C
Replies: 2
Views: 207

Re: ESP32 and LCD1602 with I2C

Hello

Have a look at this post first reply tells you what you need - viewtopic.php?t=910

Mike