Tuesday 27 August 2019

Unable to start Picoweb on micropython [Resolved]

I've recently delved into microcontrollers and iin this case, teh ESP32 DevKIT(pictured above).
Amongst the numberous possibilites of this nifty device is its ability to function as a webserver. There are various frameworks for web application and i chose picoweb.
Instructions for deployment appeared quite simple.
IDE used in my case is uPyCraft V1.1
Assumption made is that unit already has internet connection



To install picoweb:
1. Open a session to the devkit and enter below command:
     import upip
     upip.install('picoweb')
  This will install picoweb and its dependencies
If you get above error(memory allocation failed, allocating 32768 bytes, packages may be partially installed), restart the unit with boot.py and mainpy file empty or contents commented out and try again.
Installation complete. However, running a standard example retreived from the internet failed to run as a module 'ulogging' was not found.
This is resolved by running upip.install('micropython-ulogging')
Now, the server starts up but present error messages as shown below
This is resolved by deleting the /lib/uasyncio/ folder and running upip.install('uasyncio')
when run, you will notice download source is actually different than when it was installed as a dependency.
When run the webserver script now, it runs fine and connection is ok

Note: if error are encountered,power reset the unit, soft reset won't work.

No comments:

Post a Comment