Replies: 3 comments 2 replies
-
Unless you are escaping quotation marks inside a print statement it doesn't matter which ones you use. Single quotes are quicker to type. Deleted incorrect example of connecting. |
Beta Was this translation helpful? Give feedback.
-
Maybe you should consult the fine documentation at https://docs.micropython.org/en/latest/esp32/quickref.html ?
There is a reason that the example
|
Beta Was this translation helpful? Give feedback.
-
Hi All thanks for the replies, I entered the code from the latest ESP32 Quick reference website and get the same response as I did with the code from the book. normally I see on the Thonny command line the text 'Connecting to Network...' followed by the configuration IP, netmask, Gateway, DNS. When I run the code below I get nothing, no text or anything. When I try to see what wlan.ifconfig() is it tells me wlan was not defined. any thoughts on what i am doing wrong? I think I solved it below after hours of playing.
I then added import machine & import socket at the start and added the extra code below the above code. and now it connects. I guess without the defined do_connect() section added it does not process the rest after 'def' in defining the 'do_connect()
Still learning :) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi. All new to this, so learning.
I am using the Elektor Makepython ESP32 Development Kit.
Been having trouble following examples in book. just figured out that I should have flashed V3.x V1.14 firmware to the ESP32-Wrover-B board and not the V4.x V1.19. Note in book it says - instead of -- (I guess word auto corrected it to one big dash from two dashes) on the Command prompt when flashing the firmware. I now have most of the projects working in the book. figured out some commands must be capitalised instruction and some are lowercase. I am trying to do the Web Page project. I finally got it to connect using the Iphone Safari Browser or an old PC with XP Internet explorer (Guess there is not much security so new Browsers refuse to connect). I had to remove the following instruction.
Note the 'import network' is called at the start of the code, just not shown in the below snippets.
if not net.isconnected():
from the Original Code below.
Had to remove the 'Is Not' and move the code back an indent to make it work.
I also found some code that should show if it is already connected, but it just produced errors.
SSID is where I enter my SSID of the network and Password is where I enter the Password...
I see some examples where they say 'Password' and other say "Password", don't know if it makes a difference between one quotation mark or two quotation marks ( ' or " )
there is more code, including a HTML section for the imbedded Web Page. The problem is it does not work when I have the extra 'Is Not' statement in the code. I see other people using as well. is it something to do with the V3.x or V4.x firmware, still not sure why there is a difference with that.
I have V1.14 IDF3 installed into the ESP32 Development Board as per the books instructions. Using Thonny V4.0.1 and Python V3.11.1
Thanks in advance for any help provided
Beta Was this translation helpful? Give feedback.
All reactions