Z LIGHTS: Prime's answer to mobile phone torches
|
10-29-2015, 10:40 PM
Post: #1
|
|||
|
|||
Z LIGHTS: Prime's answer to mobile phone torches
As the clocks change and the nights get darker, it seems the right time for this little program...It can also be called from ZIPP, another of my programs.
Given that the HP Prime has no external accessible lights, this program may be of little practical use...unless the lights go out whilst you are using your calculator. The design aim is a compromise between maximising the limited illumination available, and including some information that a torch would not (the time the light was activated). Version 0.1: Code:
Stephen Lewkowicz (G1CMZ) https://my.numworks.com/python/steveg1cmz |
|||
11-06-2015, 10:53 PM
Post: #2
|
|||
|
|||
RE: Z LIGHTS: Prime's answer to mobile phone torches
Version 0.2 has some new functionality that you will hopefully never need.
It would be nice if someone that reads Morse code could check it out, as I haven't checked out its readability. Code:
Stephen Lewkowicz (G1CMZ) https://my.numworks.com/python/steveg1cmz |
|||
11-07-2015, 11:56 PM
Post: #3
|
|||
|
|||
RE: Z LIGHTS: Prime's answer to mobile phone torches
Version 0.3 includes a cheat mode (edit the HINTS BOOLEAN as you wish)
Code:
Stephen Lewkowicz (G1CMZ) https://my.numworks.com/python/steveg1cmz |
|||
11-08-2017, 07:17 PM
(This post was last modified: 11-08-2017 07:28 PM by StephenG1CMZ.)
Post: #4
|
|||
|
|||
RE: Z LIGHTS: Prime's answer to mobile phone torches
Z_LIGHTS V0.3 appears to reveal a change to the programmed user interface between 8151
11586 (both running on Android, but on different phones). 8151 behaviour is as intended. For example, run the main Z_LiGHTS routine, choose a nice green colour, then select "SOS". After confirming WPM, the light displays an SOS sequence. Important: Don't blame me if you do that outside of an appropriate test environment. Press Escape, and you return to the menu, where you can select a different colour or a steady light (torch). In 11586, Press Escape and you see the menu including SOS, then WPM, then the menu including SOS ... And you seem to have to interrupt execution with ON to select other menu options. Is anyone else seeing this? Or can suggest what has changed? Stephen Lewkowicz (G1CMZ) https://my.numworks.com/python/steveg1cmz |
|||
11-10-2017, 09:16 PM
Post: #5
|
|||
|
|||
RE: Z LIGHTS: Prime's answer to mobile phone torches
The cause appears to be a bug in 11586, not present in 8151 (both on Android).
In the main program, a loop on CHOOSE is examining the choose variable CHS, expecting it to be 0 if the user Escapes without selecting a choice... This seems to be the documented behaviour in the on-device help in both versions. In 8151 as expected 0 is returned. In 11586 the previous value is repeated. Changing the logic so that CHOOSE returns a boolean and using that boolean to exit fixes the change in behaviour and works in both systems. Stephen Lewkowicz (G1CMZ) https://my.numworks.com/python/steveg1cmz |
|||
11-10-2017, 09:29 PM
(This post was last modified: 11-11-2017 09:08 AM by StephenG1CMZ.)
Post: #6
|
|||
|
|||
RE: Z LIGHTS: Prime's answer to mobile phone torches
Version 0.4 implements the above fix in the main outer loop and works in both 8151 and 11586 (Android).
Code:
(Some inner loops not yet fixed). Stephen Lewkowicz (G1CMZ) https://my.numworks.com/python/steveg1cmz |
|||
01-25-2024, 03:04 PM
(This post was last modified: 01-25-2024 09:15 PM by StephenG1CMZ.)
Post: #7
|
|||
|
|||
RE: Z LIGHTS: Prime's answer to mobile phone torches
I now have a version in Python:
https://my.numworks.com/python/steveg1cmz (just the torch/beacon, no morse code yet) Stephen Lewkowicz (G1CMZ) https://my.numworks.com/python/steveg1cmz |
|||
03-14-2024, 09:58 PM
(This post was last modified: 03-16-2024 11:41 PM by StephenG1CMZ.)
Post: #8
|
|||
|
|||
RE: Z LIGHTS: Prime's answer to mobile phone torches
There are now two versions in Python:
torch (for platforms with keydown, like Numworks on Chromebook, or on an Android with an external keyboard) is preferred. Or there's torchknob for the no-buttons version (for Numworks on Android, which lacks keydown). Only the original HP PPL currently offers Morse code. Stephen Lewkowicz (G1CMZ) https://my.numworks.com/python/steveg1cmz |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)