Hi, don’t take it as a critic, but these are just few notes I would like to make based on around 70 first pages of this book I went through yesterday.
Initially I tried to flash my ESP32 board using computer running Windows 10 machine.
a) I don’t think uPyCraft is at the stage where it can be considered as stable and usable software. At the beginning it was complaining about some missing fonts. Which I had to Google around to find and install.
b) When I was trying to flash my device, I was getting error saying “access denied on port COM1”, so I thought I need to restart machine for the new UART driver to work properly.
c) To my surprise Windows machine didn’t boot after restart. I am not sure if it was installation of weird font or USB modem driver what killed it. I was not in mood to investigate problem with WIndows, so I switched to my Linux machine.
d) And what do we get on Linux machine? uPyCraft binaries don’t work, and when I tried to compile it from a source code, there are so many steps to follow. And at the end I couldn’t get Python to locate PyQT libraries I compiled earlier. So for Linux users uPyCraft is not option to use at all.
e) I eventually of course got my ESP32 flashed using esptool. It takes only one simple command to install and another to run. Why you don’t mention esptool in your book? I did find instructions in Google, but I believe that having eps-idf and it’s tools included in the book would be helpful.
f) Also tools like adafruit-ampy or webrepl should be introduced. I find these easier to use to upload files to my ESP32.
Hi Andris. Thank you for your helpful feedback! I can answer all your questions and tell you why I end up using uPyCraft IDE.
- a) In my opinion, uPyCraft IDE has some bugs, but it’s proven to be very stable for me (tested on Windows, Mac OS X and Linux Ubuntu 16.04). The missing font depends on your computer (I didn’t have that problem), but some computers are missing that particular font. You don’t need to install it, but it will prompt that message when you open it according to a reader. I’ve already addressed here and it will be available in the next update: https://rntlab.com/installation-problem-with-upycraft/
- b) That COM port error means that you might have another program (like Arduino IDE or you even ran the ESPtool.py flasher) using that Port and uPyCraft can’t access the COM port because it’s still being used
- c) I think that was an unfortunate coincidence, but I don’t think it’s possible this program to crash your computer, but I would need to personally test it to see what happened.
- d) I’ve tried the binaries on Linux Ubuntu and they ran fine… Which distro are you using?
- e) Yes, I’ve also used ESPtool.py, but I honestly think that uPyCraft with the user interface is easier to use for most people
- f) I’ve used webrepl multiple times and it constantly crashed, it would often fail or it would be very hard to create projects that used Wi-Fi… It’s also not very stable with the ESP32, yet. That’s why I preferred to use an IDE
To sum up, I agree that uPyCraft IDE is not ideal, but from my tests I still think it’s one of the best setups. I do plan to add more instructions in different methods of programming with MicroPython (like webrepl) in future eBook updates.
Thanks again! Your feedback is very important to see what I need to change and improve in the next update.
Hi Rui, thanks for your reply.
a) Yesterday I did revive my M$ Windows 10 machine and did give uPyCraft another chance. Yes it is working and also is easy to use! I even managed to get OLED display which is soldered on my ESP32 board working, thanks to the examples they have included there.
b) Regarding Linux, I am using Ubuntu 18.04. So uPyCraft binary doesn’t work. I spent some time trying to compile it from source, authors instructions don’t work as the compiled PyQT4 can’t be located by later source packages. I tried several parameters with no luck.
I had connection issue to UART interface, because by default driver was set to 9600 baud rate. I did change it to 115200 in device manager and everything did work.
But all necessary libraries are also available as Ubuntu binary packages, so script from this github report in the link below will work.
Then I needed a little bit of the time to figure out where the outputs of “pyintaller” are and how to run compiles package. But at the end I got uPyCraft working on my Ubuntu as well.
So maybe you can provide these links in your Linux installation section.
c) I did advance a little bit through the book itself as well. Module about Python is very well written. Very easy to understand explanation of classes and methods. Well done!
Hello Andris, I apologize for taking so long to get back to you, but I’ve been trying to figure out how I would solve that problem of installing uPyCraft IDE on Ubuntu 18.04.
I’ve tried to compile and after many failed attempts, I can’t make it work either. So, I’ve decided to work on another method to program the ESP32/ESP8266 with MicroPython.
I’ve just posted a new blog post about that subject a few minutes ago:
- Learn how to Flash MicroPython Firmware with esptool.py on ESP32 and ESP8266
- Getting Started with Thonny MicroPython (Python) IDE for ESP32 and ESP8266
Can you try to program the ESP with Thonny IDE?
It looks like it’s a better alternative for Linux. Let me know your results, because I plan to update the eBook to include different methods to program with MicroPython firmware.
We also plan to add to the eBook how to use OLED and other sensors that we currently don’t mention. We’ll be working on that next week.
Thanks for your patience.