wasp-os: MicroPython for PineTime! - Printable Version +- PINE64 (https://forum.pine64.org) +-- Forum: PineTime (https://forum.pine64.org/forumdisplay.php?fid=134) +--- Forum: Development Discussion on PineTime (https://forum.pine64.org/forumdisplay.php?fid=136) +--- Thread: wasp-os: MicroPython for PineTime! (/showthread.php?tid=9017) |
RE: wasp-os: MicroPython for PineTime! - danielt - 12-10-2020 (12-07-2020, 07:05 AM)purlupar Wrote:(12-07-2020, 05:25 AM)danielt Wrote: To be honest I've never seen the simulator unreactive to these things. There are a couple of ways a broken application could cause this but you've done a fresh clone and the built-in applications are unlikely to cause this. A simple trick might be to reverse the comments in lines 57/58: https://github.com/daniel-thompson/wasp-os/blob/master/wasp/boards/simulator/display.py#L58 Using sdl2.ext.PixelView instead of sdl2.ext.pixels2d makes screen updates incredibly slow but there is a warning issued by pixels2d to say it is experimental so it is worth a try. Might also be useful to know what distro you are running. RE: wasp-os: MicroPython for PineTime! - purlupar - 12-12-2020 (12-10-2020, 03:55 AM)danielt Wrote: A simple trick might be to reverse the comments in lines 57/58: https://github.com/daniel-thompson/wasp-os/blob/master/wasp/boards/simulator/display.py#L58I'm afraid that did not make it work either. (12-10-2020, 03:55 AM)danielt Wrote: Might also be useful to know what distro you are running. Arch, with the python modules installed as Arch (Pacman) packages. I remembered that in the beginning (spring 2020), I had exactly this problem, and then in the fall at some point it worked (i.e. the simulator was controllable by swipes/keyboard). Seems I messed it up again now. What I am up to next is further minimize down sdl hello world examples to find the issue. Or maybe start a virtual environment and install the py-modules via pip. Any pointers would be appreciated, (anyone on Arch reading this?) I feel kind of stuck! RE: wasp-os: MicroPython for PineTime! - exhoplex - 01-08-2021 Daniel, I have tried your OS its really good I like it Just a quick question, what is the best way to change the time? I used to use my PinePhone to connect to the watch using bluetoothctl and manually setting the HEX bits needed to change the time using the Time Service I tried this with wasp OS and I keep getting [CHG] Device D3:14:37:A9:BB:32 Connected: yes Failed to pair: org.bluez.Error.AuthenticationFailed [CHG] Device D3:14:37:A9:BB:32 Connected: no When I look at the nrf app I can't see the time service anymore. =========== ok I found the below, I just need to figure out how to do it. At the end of the install process your watch will show the time (03:00) together with a date and a battery meter. When the watch goes into power saving mode you can use the button to wake it again. At this point you will also be able to use the Nordic UART Service to access the MicroPython REPL. You can use Code: tools/wasptool --console To set the time and restart the main application: [color=var(--color-prettylights-syntax-constant)]^[color=var(--color-prettylights-syntax-variable)]C[/color] watch.rtc.[color=var(--color-prettylights-syntax-entity)]set_localtime[/color]((yyyy, mm, dd, [color=var(--color-prettylights-syntax-variable)]HH[/color], [color=var(--color-prettylights-syntax-variable)]MM[/color], [color=var(--color-prettylights-syntax-variable)]SS[/color])) wasp.system.[color=var(--color-prettylights-syntax-entity)]run[/color]()[/color] Or, if you have a suitable GNU/Linux workstation, just use: ./tools/wasptool --rtc ============================= Never mind I found what I needed now Simply run the script (using Python 3 - Python 2 is not supported!) and it automatically connects to the first NUS console it can find. Exit using Code: Ctrl-X RE: wasp-os: MicroPython for PineTime! - danielt - 01-08-2021 If you have an Android device then you can just use GadgetBridge. I've sent the patches upstream but they are not applied at this point so you'll need to grab the .apk from the CI loop: https://github.com/daniel-thompson/gadgetbridge/actions/runs/445429267 For regular laptops then ./tools/wasptool --rtc is the way to go (if they have good Bluetooth Low Energy support). I've not 100% sure that wasptool is running on PinePhone although, in principle, it is exactly the same as running it on regular Linux (clone the repo, grab the prerequisites mentioned in the install guide and run wasptool... it will help to be using one of the desktop-ish distros such as Debian or Manjaro on the phone). Either way I suspect Marteen de Jong would almost certainly know since he has started adopting wasptool as the backend for a GUI tool he is working on: https://gitlab.com/arteeh/wasp-companion . RE: wasp-os: MicroPython for PineTime! - pagesix1536 - 01-17-2021 Got the modified build of gadgetbridge installed. (What an ordeal! This was not easy to do, and not very well explained.) What functionality do we have with it? I can see it sets the time. I tried the music player. I got it to work once (I think, maybe) and pause the music, but that's all it did. Hung the watch and I had to long-press for a reboot. UPDATE: I actually got a few more features of the music app working, it did pause/unpause and I got it to skip tracks (didn't know you could do that until I looked at the source code for it). But it's a little crashy, and locks the watch up eventually. Unsure why, just stops responding and all you can do is long-press for a reboot. RE: wasp-os: MicroPython for PineTime! - danielt - 01-22-2021 To be honest I didn't know it was explained at all! Anyhow the main thing GadgetBridge is useful for is to ensure notifications on your phone appear on your watch (and clearing them on the phone should also clear them on the watch to avoid the watch getting swamped with old messages). RE: wasp-os: MicroPython for PineTime! - TenSparklez - 02-06-2021 (02-04-2020, 01:43 PM)danielt Wrote: Update 22 Nov 2020:Hello, new player here. May I ask how do I launch the simulator? I am currently using a macOS system with python 3.9 installed. Where should I be typing <make sim>? Thanks in advance. RE: wasp-os: MicroPython for PineTime! - TenSparklez - 02-06-2021 TenSparklez Hello, new player here. May I ask how do I launch the simulator? I am currently using a macOS system with python 3.9 installed. Where should I be typing <make sim>? Thanks in advance. Update: Manage to figure it out myself and make the simulator running. Now I have a new question. If I develop a new application for the watch, how do I compile it into a new zip file that can be uploaded into the watch? Thank you very much. RE: wasp-os: MicroPython for PineTime! - danielt - 02-08-2021 (02-06-2021, 09:34 PM)TenSparklez Wrote: Update: Manage to figure it out myself and make the simulator running. Now I have a new question. If I develop a new application for the watch, how do I compile it into a new zip file that can be uploaded into the watch? Thank you very much. For small applications there is no need to compile the app into the zip file since you can just install you application over bluetooth. However if you do want to add it to the zip file (a.k.a. freezing your application into the binary), either because your laptop does not support wasptool or because the application is too large to fit into RAM then that is also possible. All the various approaches to running your app on real hardware are described in the Application Writer's Guide: https://wasp-os.readthedocs.io/en/latest/appguide.html RE: wasp-os: MicroPython for PineTime! - danielt - 02-20-2021 The wasp-os project is proud to announce the release of wasp-os v0.4. Wasp-os is a firmware for smart watches that are based on the nRF52 family of microcontrollers, and especially for hacker friendly watches such as the Pine64 PineTime. Wasp-os features full heart rate monitoring and step counting support together with multiple clock faces, a stopwatch, an alarm clock, a countdown timer, a caclulator and lots of other games and utilities. All of this, and still with access to the MicroPython REPL for interactive tweaking, development and testing. During the v0.4 development cycle our focus was on improving the watch/phone integration whilst also taking steps to improve the general fit and finish. This release introduces a new clean-and-simple analog watch face, new button, checkbox and spinner widdgets to make UI more consist, new customization options such as a theming engine and a configuration tool that provides access to most of the new goodies without having to write a line of Python code (although Python is still fully available to those that want to make very deep customizations). In this development cycle we have worked with the Gadgetbridge project to add wasp-os support to the latest versions of Gadgetbridge. For more information on how to obtain Gadgetbridge (hint: don't use the Play store) take a look at the appropriate wiki page. As usual documentation is an important part of making wasp-os awesome so you can read up on how to install wasp-os and take look at all the new apps and features right now at: at: https://wasp-os.readthedocs.io You can also see many of the new features in action by looking at some of the most recent wasp-os video blogs: * A tour of the new applications for wasp-os * Step counting and heart rate monitoring on Pine64 PineTime |