Wasp-os editing main.py
#1
OK I was able to put together a App that logs in multiple values. I am able to run the app successfully on using WASP-OS `make sim` command  Here is the video link[/url]

however I cannot test the App on the PineTime watch as the App is too large So thanks to the documentation I followed the instruction in section [url=https://wasp-os.readthedocs.io/_/downloads/en/latest/pdf/]4.4.3 by Uploading the source code form to the watch
 I follow it step by step upload the source code to External flash no problem. But I also had to edit the main.py and seems something went wrong SO now whenever I bootup my pinetime the screen gets Froozen with main.py displayed on the screen.

I tried to reflash the reloader-mcuboot.zip and fresh micropython but that did not change the behavior. How do I delete the main.py that I have edited when it freezes on it https://pastebin.pl/view/dcfbd7b5

Any ideas guys is there is something wrong in Line 19 to 23 Please let me know
  Reply
#2
If the device doesn't boot due to a bad main.py then the BLE interfaces may still work (e.g. you can upload a new main.py). If not you need to boot in safe mode and then use BLE to fix the problem. Safe mode is documented in the Troubleshooting section.

To debug the underlying problem try uploading the original (unmodified) main.py and try executing the commands on the console instead. I suspect the problem is either that HRV needs to be lowercase or simply that there is not enough memory to compile the script.


If you are hitting RAM limits you need to keep working through the options. Loading an .mpy uses less RAM than loading a .py and including the app in the flash image uses even less RAM than a .mpy .
PineTime: wasp-os and MicroPython, Pinebook Pro:  Debian Bullseye
  Reply
#3
@danielt  Thanks Daneilt, I had a tired DFU MCU-bootloader and DFU micropython.zip and the main.py did not get overwritten I was surprised; however, in the Safemode, I did manage to put the main.py the way it was and uploaded it back to the watch and was able to recover from the frozen screen on main.py Thanks.However now I am stuck on the 4.4.4 section page 41 https://wasp-os.readthedocs.io/_/downloa...atest/pdf/ I was able to create the mpy file using the command '<i>sh$ ./micropython/mpy-cross/mpy-cross -mno-unicode -march=armv7m myapp.py</i>' It created myapp.mpy file which I uploaded to the watch using --binary --upload switch in wasptool BUT the myapp also requires other libaries / pythonscripts/data located in the folder Algo_Viz_Lib inside which there is data folder that contains the data and about 10 python script for running the algo Should all these files also be uploaded to the watch if so How do I create the folder Algo_Viz_lib to the watch The size of the folder is 3.14MB
  Reply
#4
I am using the open-source GitHub algorithm that has 10 python scripts inside hearty https://github.com/paulvangentcom/heartr...sis_python can this be converted to python3 and uploaded to the watch to extract HRV reading?
  Reply
#5
(08-06-2021, 01:59 AM)Mpoint Wrote: I am using the open-source GitHub algorithm that has 10 python scripts inside hearty https://github.com/paulvangentcom/heartr...sis_python can this be converted to python3 and uploaded to the watch to extract HRV reading?

This tool also looks like it is based around numpy and a number of other python libraries so I think the answer is pretty much identical to the one about pyhrv (see https://forum.pine64.org/showthread.php?...0#pid94810 ). As before I'd recommend getting the library code working in the Unix port of Micropython before attempting to move it the watch.

Note also that you may have to be very careful to adopt algorithms that are optimized for minimal memory usage. The Pinetime has very limited RAM!
PineTime: wasp-os and MicroPython, Pinebook Pro:  Debian Bullseye
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Unable to switch from Wasp-OS back to Inifinitime using GadgetBridge Bruce Kissinger 0 254 10-02-2024, 07:31 PM
Last Post: Bruce Kissinger
  wasp-os status erikzoltan 5 2,357 10-06-2023, 11:32 AM
Last Post: xet7
Sad wasp simulation error pratyush049 1 3,419 06-24-2020, 06:51 AM
Last Post: danielt

Forum Jump:


Users browsing this thread: 1 Guest(s)