Wemos programming

More
4 months 1 week ago #11592 by Duane
Replied by Duane on topic Wemos programming
Hi Ian,
Firstly, I have done some Arduino programming, but not Python.

I should start out mentioning that when (showing my age) I used to program low level drivers in assembler, I created an error IE.BUD which is "Internal Error - Bad User on Device". It could well be that the problems I had were IE.BUD induced.

On this Windows 10 notebook, I installed the latest Arduino IDE V1.8.12, added the ESP8266 libraries, and installed the latest version of Python 3.8.3.

ESPTOOL was not in the directory mentioned above, but I found a copy in:
C:\Users\UID\Documents\ArduinoData\packages\esp8266\hardware\esp8266\2.7.1\tools\esptool

After CD'ing to that directory, I invoked the command line shown in the firmware V5 README-Flashing.

My first problem was that it took me a few minutes to realize I needed to envoke the ESPTOOL with the .PY extension. Duh. This could be added to the README for non-Python users like me.

Upon re-invoking ESPTOOL.PY with the comand string shown in the README, it failed indicating a missing parameter. It took me a little while to realize that ESPTOOL must have changed the parameters somewhere along the way, and the command line from the README did not work with my version of ESPTOOL. I scratched my head for a while trying to map the parameters from the command line in the README to the command set supported by ESPTOOL before deciding to come back to this thread.

I downloaded NodeMCU-PyFlasher-4.0-x64, and it was easy as pie to use - no long parameter strings needed. It worked first time. I am not even sure if NodeMCU-PyFlasher-4.0-x64 needs the Arduino IDE or Python or not.

I would recommend NodeMCU-PyFlasher-4.0-x64 as the documented way to flash the Wemos board on Windows (at least Windows 10).

Let me know if you have any additional questions.

- Bill

Please Log in or Create an account to join the conversation.

More
4 months 1 week ago - 4 months 1 week ago #11596 by Ty_Eeberfest
Replied by Ty_Eeberfest on topic Wemos programming
You're not alone... I began my "career" with HP BASIC on a Teletype ASR-33 hardcopy terminal at 110 baud. Then I "advanced" to assembly on punch cards on a Burroughs 4700 mainframe. Yeah I'm getting old.

Thank you for the good feedback. I just took another look at ESPTOOL and sure enough they have completely redesigned the command line arguments again. Grrrrr. I'm not sure why they felt that was necessary.

At this point I'm done with ESPTOOL, at least as a command line utility for loading .bin files into ESPs. NodeMCU-PyFlasher-4.0-x64 is a far cleaner solution. I am quite sure it does not depend on the Arduino IDE. As far as any dependencies on Python, I need to find a Python-free system here to test it on. My suspicion is that, being an .exe, it has everything it needs compiled into it already.

Look into it later when the dust is clearing off the crater.
Last edit: 4 months 1 week ago by Ty_Eeberfest.

Please Log in or Create an account to join the conversation.

More
4 months 1 week ago #11598 by Ty_Eeberfest
Replied by Ty_Eeberfest on topic Wemos programming
To follow up... I got a fresh copy of the NodeMCU flasher from here:
github.com/marcelstoer/nodemcu-pyflasher/releases/tag/v4.0
I saved the .exe on the desktop of a bog-stock installation of Win10 Enterprise LTSC. No Python and no Arduino IDE present. I had to install the CH340 USB/Serial driver and nothing else. Ran the NodeMCU program, flashed a Wemos, success on the first try.

Conclusion: NodeMCU-PyFlasher-4.0-x64 is clean and simple. It requires no installation and has no dependencies aside from the obvious need for a port driver. 10/10 would flash again.

Look into it later when the dust is clearing off the crater.

Please Log in or Create an account to join the conversation.

More
4 months 1 week ago #11605 by Duane
Replied by Duane on topic Wemos programming
Hi Ty,
Yes, sounds like we had similar starts. I started as a biologist, but at the time couldn't find a job (economy crash), so I ended up working at Digital Equipment Corp on PDP-11s, sometimes using ASR33s and paper tape. Dang I miss those switch registers and blinking lights - maybe that is one reason I like nixies!

Thanks for looking into the ESPTool issue, I appreciate the help.

- Bill

Please Log in or Create an account to join the conversation.

More
4 months 1 week ago #11607 by Duane
Replied by Duane on topic Wemos programming
Ian, Ty,
Did you base the Wemos Web Server off of some public domain implementation? If so, could you provide a link to the source?

I like the way you did the WiFi management of the clock so much, that I would like to do something similar with a fish tank controller I want to build.

- Bill

Please Log in or Create an account to join the conversation.

More
4 months 6 days ago - 4 months 6 days ago #11609 by Ty_Eeberfest
Replied by Ty_Eeberfest on topic Wemos programming
The Wemos code isn't open sourced (yet?) so I can't just hand you a copy of the code without Ian's approval. Having said that...

The routine that tries to connect to your WiFi network and creates an access point with a captive portal if it can't connect (to allow you to enter a WiFi SSID and password) is provided by the WiFiManager library:
github.com/tzapu/WiFiManager

The underpinnings of the Web Server / Web Pages are provided by ESP8266WebServer which is part of the ESP8266/Arduino core:
github.com/esp8266/Arduino

Page generation and the parsing and handling of arguments sent by the user's browser are "hand built" and don't make use of libraries.

The code for some of the older non-Wemos Arduino kits IS open source. The code doesn't make use of WiFiManager but you can see how the pages are generated and arguments handled. It's very similar but not quite identical to how it's done in the Wemos. The Wemos code has the web related stuff more neatly compartmentalized than the open source programs but it works pretty much the same. You should start by looking at "WiFiTimeProviderESP8266". Open source code is here:
bitbucket.org/isparkes/nixiefirmwarev2/src/master/

Arduino code is essentially C++ but you'll find that the majority of the code is in the style of plain old C.

Look into it later when the dust is clearing off the crater.
Last edit: 4 months 6 days ago by Ty_Eeberfest.

Please Log in or Create an account to join the conversation.

Time to create page: 0.174 seconds

Search

Tube Suppliers

Go to top
JSN Boot template designed by JoomlaShine.com