This is a fork off of the New DIY Handheld Computer:
Quote from: granz on Dec 19, 2024, 07:33 AMQuote from: Chris Savage on Dec 18, 2024, 09:39 AMI can't wait to see where you go with all of this. :)
Yeah, me too.
Unfortunately, my CrowPanel system has started spontaneously rebooting. It's not the hardware, because it can sit for hours (days?) and never reboot. It seems that there is something about the interrupts, and only happens while I'm playing around, trying to get the thing working the way I want (which, of course, is in PicoMite BASIC. ;) ) So, it is appearing that this is going where I design the PCB myself, according to my own specs - which is where I should have gone to begin with. ::)
Plus, with Christmas approaching, there is less time to play right now.
Well, as I mentioned earlier (https://savagechats.com/index.php?msg=3090) I was playing around, Googling "wrist mounted cyberdecks". That got me thinking about this CrowPanel (display with built-in Pico - I loaded PicoMite BASIC on it.) So, I got it back out, and started playing with it, checking the schematics more carefully. And, what do you know - I got the touch to start working correctly (corrected the touch IRQ pin.) :o Yay! ;D
So, I took one of my LiPO batteries (3.7V @ 2500 mAh,) and plugged it in. Now, I will charge up the battery (the unit has a charging indicator LED on the bottom) and then write a short program to update a file with date and time. Once I figure out how long the battery will last, I can start working on making it a usable handheld computer.
Well, the test is on.
To find out how long this computer can last on a fully charged battery, I ran this program:
Date$="01-01-2000"
Time$="00:00:00"
Do While 1
Open "b:test.dat" For append As #1
Print #1,Date$,Time$
Print #1," "
Print #1,"------------------"
Close #1
Print Date$,Time$
Print " "
Print "------------------"
Pause 300000
Loop
As soon as I pressed <ENTER> on the run command, I pulled the USB plug so it is fully on battery power. The battery had been charging since yesterday, and should be fully charged (unfortunately, the charge LED on the bottom of this "handheld" only indicates that it has charging current available, it does not shut off when the battery is charged. :( )
So, when the computer shuts off, I should be able to power it back up and check the test.dat file on the SD card. That will tell me how long (to five minutes resolution) the battery lasted. I am hoping for over twenty-four hours. With the 130mA draw from my earlier post https://savagechats.com/index.php?topic=347.msg1498#msg1498,) it will hopefully be about nineteen hours. Maybe I can get that up a bit with shutting off the screen at times. Either way, nineteen hours is better than I get on my phone.
Once I know that, I will get into GUI programming (yes, PicoMite BASIC has many GUI commands built-in. :) ) Yay, now I can be a GUI programmer. 8)
Well, I started the test last night at about 6:00 PM. It is now approaching 9:00 AM, and the screen is still lit up. So, we are near 15 hours, and still going. Hopefully it will keep going for several more hours.
Woohoo - it has gone for 24 hours! ;D
(https://files.granzeier.com/Downloads/SavageCircuits/Pico%20handheld%20at%2024%20hours.jpeg)
We shall now see how long it will go on this single 2500mAh charge.
Okay, so I checked (as reported in the last post) about 6:00PM, and the thing was still running. After dinner (about 7:15PM,) I checked again, and the display is dark. So, a bit over 24 hours! ;D
I will check the data file tomorrow, and see exactly how long it lasted. It appears that it will be able to run for over 24 hours per charge, probably more with some energy-saving tricks.
Houston, we have a problem.
I checked the SD card, and the file is on there, but there are only three entries from the PicoMite computer. :( The screen did show only those three entries, but I had been experiencing troubles, and thought that it was just not scrolling the screen. So, I'm not sure what happened here. Next up is to load up the newest PicoMite firmware, and carry on.
On the plus side, I do know that it was still running at 6:00 PM, so it did run for over 24 hours. So, that makes this a great candidate for a "daily driver" system - the possibilities are endless. Monday, we will go shopping, and I have already put a sweat band on the shopping list. This CrowPanel, with battery, will be attached to the sweat band, giving me a nice wearable.
A nice "smart watch" has been on my list for many years. I was very disappointed when I got my first smart watch - a PineTime (https://pine64.org/devices/pinetime/ - which I still have, and wear whenever I go outside the house) and discovered that smart watches are NOT smart, but really just semi-smart peripherals for your phone. I wanted a watch that was smart on its own, not a terminal for my phone. So, the first thing that I will write for this is a clock, followed very closely by some kind of menu system, so that I can run whatever BASIC program that I want to. Hopefully, that will evolve into some kind of RTOS.
Quote from: granz on Sep 13, 2025, 09:00 AMHouston, we have a problem.
I checked the SD card, and the file is on there, but there are only three entries from the PicoMite computer. :( The screen did show only those three entries, but I had been experiencing troubles, and thought that it was just not scrolling the screen. So, I'm not sure what happened here. Next up is to load up the newest PicoMite firmware, and carry on.
On the plus side, I do know that it was still running at 6:00 PM, so it did run for over 24 hours. So, that makes this a great candidate for a "daily driver" system - the possibilities are endless. Monday, we will go shopping, and I have already put a sweat band on the shopping list. This CrowPanel, with battery, will be attached to the sweat band, giving me a nice wearable.
A nice "smart watch" has been on my list for many years. I was very disappointed when I got my first smart watch - a PineTime (https://pine64.org/devices/pinetime/ - which I still have, and wear whenever I go outside the house) and discovered that smart watches are NOT smart, but really just semi-smart peripherals for your phone. I wanted a watch that was smart on its own, not a terminal for my phone. So, the first thing that I will write for this is a clock, followed very closely by some kind of menu system, so that I can run whatever BASIC program that I want to. Hopefully, that will evolve into some kind of RTOS.
That looks like a nice watch. As for the project, idk, but good luck on it.
Quote from: JKnightandKARR on Sep 13, 2025, 11:07 PMThat looks like a nice watch. As for the project, idk, but good luck on it.
Thanks, I'm looking forward to getting the sweatband, and checking it out. My previous Pico-based clock (https://savagechats.com/index.php?topic=339.0) had a WiFi Pico, and so was able to set the time itself, via NTP (Network Time Protocol.) Since the CrowPanel has a regular (I.E. not WiFi) Pico, the time will need to be set manually. Although, I may add an external RTC to it - there should be enough room under the unit, next to the battery. Part of that decision will be how well the thing keeps time by itself.
Quote from: granz on Sep 14, 2025, 06:00 AMQuote from: JKnightandKARR on Sep 13, 2025, 11:07 PMThat looks like a nice watch. As for the project, idk, but good luck on it.
Thanks, I'm looking forward to getting the sweatband, and checking it out. My previous Pico-based clock (https://savagechats.com/index.php?topic=339.0) had a WiFi Pico, and so was able to set the time itself, via NTP (Network Time Protocol.) Since the CrowPanel has a regular (I.E. not WiFi) Pico, the time will need to be set manually. Although, I may add an external RTC to it - there should be enough room under the unit, next to the battery. Part of that decision will be how well the thing keeps time by itself.
good luck on it. I just wish i could have total freedom to design my own watch face on my smartwatch.
Quote from: JKnightandKARR on Sep 15, 2025, 01:01 AMI just wish i could have total freedom to design my own watch face on my smartwatch.
That's just it - the smart watches of today are light years away from what I understood them to be when they first came out. Now-a-days smart watch programming requires multi-megabyte (or gigabyte) programming environments, and months (at least) to get to understand the language, and libraries. In addition to that, most of the watches that I researched are nothing more than "glorified phone terminals."
In contrast, this "watch" could be understood by a novice in about a week, and new "programs/apps/whatevers" can be developed - completely apart from the phone - quickly.
Quote from: granz on Sep 15, 2025, 07:01 AMQuote from: JKnightandKARR on Sep 15, 2025, 01:01 AMI just wish i could have total freedom to design my own watch face on my smartwatch.
That's just it - the smart watches of today are light years away from what I understood them to be when they first came out. Now-a-days smart watch programming requires multi-megabyte (or gigabyte) programming environments, and months (at least) to get to understand the language, and libraries. In addition to that, most of the watches that I researched are nothing more than "glorified phone terminals."
In contrast, this "watch" could be understood by a novice in about a week, and new "programs/apps/whatevers" can be developed - completely apart from the phone - quickly.
cool
Quote from: granz on Sep 13, 2025, 09:00 AMHouston, we have a problem. I checked the SD card, and the file is on there, but there are only three entries from the PicoMite computer. :( The screen did show only those three entries, but I had been experiencing troubles, and thought that it was just not scrolling the screen. So, I'm not sure what happened here. Next up is to load up the newest PicoMite firmware, and carry on.
Did you ever figure out what happened with this?
Quote from: Chris Savage on Sep 15, 2025, 01:52 PMDid you ever figure out what happened with this?
Not yet. I'm going to our auto shop (since I bought the car from my friend's dealership - they have free inspections for as long as you own the car - I'm taking it to the dealer,) tomorrow. I'll be working on it then.
Quote from: granz on Sep 15, 2025, 03:22 PMNot yet. I'm going to our auto shop (since I bought the car from my friend's dealership - they have free inspections for as long as you own the car - I'm taking it to the dealer,) tomorrow. I'll be working on it then.
Pardon my confusion, sir, as I have been out of state for days, having just returned yesterday (
AND it's a Monday); but are you saying your local auto shop can diagnose PicoMite code and determine why the SD card only shows three entries, despite running for over 24 hours?!? :o
Quote from: Chris Savage on Sep 15, 2025, 04:06 PMPardon my confusion, sir, as I have been out of state for days, having just returned yesterday (AND it's a Monday); but are you saying your local auto shop can diagnose PicoMite code and determine why the SD card only shows three entries, despite running for over 24 hours?!? :o
HA! LOL! That was good.
Quote from: granz on Sep 15, 2025, 03:22 PMNot yet. I'm going to our auto shop (since I bought the car from my friend's dealership - they have free inspections for as long as you own the car - I'm taking it to the dealer,) tomorrow. I'll be working on it then.
Some of these could probably be posted into the "Humor" board. Of course, they lose something without the background.
Quote from: granz on Sep 15, 2025, 06:04 PMHA! LOL! That was good.
I wish I was joking. I am too literal sometimes. I guess I misread / misunderstood that message. :-X
Quote from: granz on Sep 15, 2025, 06:04 PMSome of these could probably be posted into the "Humor" board. Of course, they lose something without the background.
I see the humor in it, only now. :-[
Quote from: Chris Savage on Sep 16, 2025, 12:09 AMQuote from: granz on Sep 15, 2025, 06:04 PMHA! LOL! That was good.
I wish I was joking. I am too literal sometimes. I guess I misread / misunderstood that message. :-X
Quote from: granz on Sep 15, 2025, 06:04 PMSome of these could probably be posted into the "Humor" board. Of course, they lose something without the background.
I see the humor in it, only now. :-[
I told Marilyn about it, and she laughed out loud - she thought that you were joking too.
Quote from: granz on Sep 16, 2025, 06:36 AMI told Marilyn about it, and she laughed out loud - she thought that you were joking too.
You can tell her that's why I posted the programmer joke in the Tech Humor forum about milk and eggs. For some of us, it's a real struggle.
Quote from: Chris Savage on Sep 16, 2025, 10:02 AMYou can tell her that's why I posted the programmer joke in the Tech Humor forum about milk and eggs. For some of us, it's a real struggle.
Yep, I told her about that, and she agreed with my assessment about her not falling for that after so long with me. ;)
Looks like I will need to split this off into another project thread.
(https://files.granzeier.com/Downloads/SavageCircuits/SmartWatch%20Ver%200.1.jpeg)
Quote from: granz on Sep 13, 2025, 09:00 AMHouston, we have a problem.
I checked the SD card, and the file is on there, but there are only three entries from the PicoMite computer. :( The screen did show only those three entries, but I had been experiencing troubles, and thought that it was just not scrolling the screen. So, I'm not sure what happened here. Next up is to load up the newest PicoMite firmware, and carry on.
Today I take the car in to have them check out the electrical trouble that started when I left for the meetup. Of course, something has to go with me to keep me busy - in addition to my main computer (still working on recovering that) I will be taking my smart watch. When I came back to this thread, I saw that I never close the data file (how did I make that rookie mistake? ::) ) I'm guessing that that caused some kind of overflow that stopped the writing to the file. That will be fixed, today.
Quote from: granz on Sep 30, 2025, 07:32 AMI saw that I never close the data file (how did I make that rookie mistake? ::) ) I'm guessing that that caused some kind of overflow that stopped the writing to the file. That will be fixed, today.
Is that what caused it to only write three entries?
Quote from: Chris Savage on Sep 30, 2025, 07:49 AMQuote from: granz on Sep 30, 2025, 07:32 AMI saw that I never close the data file (how did I make that rookie mistake? ::) ) I'm guessing that that caused some kind of overflow that stopped the writing to the file. That will be fixed, today.
Is that what caused it to only write three entries?
That is what I am guessing, but I haven't had a chance to test that (and I may not actually test it - just continue on.) While I was at the car shop, I spent all the time trying to get my computer back up (still got quite a bit to go,) and did not get my "watch" (CrowPanel) out to
play with work on it.
Sometimes I bookmark unresolved things like this, and sometimes come back to find that they stalled out completely. LOL
Yeah, I guess that I just have too many other projects. :(
I'll get back to testing this soon. Thanks for the reminder.
Quote from: granz on Aug 05, 2026, 09:02 PMYeah, I guess that I just have too many other projects. :( I'll get back to testing this soon. Thanks for the reminder.
I think the reason I bookmarked it was because I had a theory as to why you only had three entries in the file, but was waiting for more information.
Quote from: Chris Savage on Aug 06, 2026, 09:46 AMI think the reason I bookmarked it was because I had a theory as to why you only had three entries in the file, but was waiting for more information.
So, do you remember your theory, and what "more information" were you hoping to get? That would help me to form my experiments to try to get that more information.
Quote from: granz on Aug 06, 2026, 11:03 AMSo, do you remember your theory, and what "more information" were you hoping to get? That would help me to form my experiments to try to get that more information.
The old memory isn't what it used to be. I'd have to re-read the thread and see if jogs my memory.
Quote from: Chris Savage on Aug 06, 2026, 11:11 AMThe old memory isn't what it used to be. I'd have to re-read the thread and see if jogs my memory.
Understood - let me know if you remember.
Quote from: granz on Aug 06, 2026, 11:26 AMUnderstood - let me know if you remember.
If I recall, I think my thoughts at the time were that if the battery ran out, the file may not have closed properly, leaving an impartial file. I think I was thinking the safer way to do it would be to open the file for append, write to it, close it, then do the same on the next capture. You'd be less likely to lose data, especially if it were writing once per minutes, as opposed to constantly.
Well, in my first response (#1,) I showed the program, and it does close the data file, just before printing the date and time on the screen. So, I'm not sure what is going on there.
I just plugged it in, and here is the newly rewritten program:
Date$ = "01-01-2000"
Time$ = "00:00:00"
Do
Open "b:test-time.dat" For append As #1
Print #1, Date$, Time$
Close #1
Pause 300000 ' Delay for five minutes
Loop
This is basically the same as the above program - missing the display onto the screen.
Since, I had let the battery die, I will leave it plugged in until tomorrow to fully charge the battery. Then I will unplug it and immediately start the program. Hopefully, this will give us something with which to work on finding the troubles.
Okay, so I guess I am wondering...did you see the time / date stuff being printed more than three times before it died before? I guess what I am wondering is, was the program actually running two or three hours later?
Oh, it wasn't running that program. I just let the battery die, so that I could store it more safely. I'll get the experiment started tomorrow.
Okay, I let the program run for a while and then broke it. It showed six entries in the data file.
So, I added a bit of niceness to give a count of how long the thing has been running:
> list
Date$ = "31-12-1999"
Time$ = "00:00:00"
cnt = 0 ' Number of minutes program has been running
Do
Open "b:test-time.dat" For append As #1
Print #1, Date$, Time$
Print #1, "Running for "cnt" minutes."
Print #1, "----------------------------------------"
Close #1
cnt = cnt + 5
Pause 300000 ' Delay for five minutes
Loop
>
(If is ain't broken, keep playing with it until it is. :P )
I'll let it run for a bit to make sure that it works, then I will run it, and unplug the power. We shall see how long the battery lasts - without any power-saving efforts, like shutting off the screen.
I'm guessing that there's no way, programmatically, to determine when it is running on battery versus mains?
Quote from: Chris Savage on Aug 07, 2026, 08:15 AMI'm guessing that there's no way, programmatically, to determine when it is running on battery versus mains?
I was going to say, no. But then I remembered that the Pico, itself, can read the incoming voltage. It took a while, but looking at the schematic (https://www.elecrow.com/download/product/DIS01135P/CrowPanel_Pico_Display-3.5_V1.0-SCH.pdf,) there is VBAT going to pin GP29 on the RP2040. That is the pin on the Pico that let's the chip read the incoming voltage.
When the experiments end, I will test out that voltage reading, and see if a program can tell if the power is applied, or it is running on battery.
Quote from: granz on Aug 07, 2026, 08:18 PMWhen the experiments end, I will test out that voltage reading, and see if a program can tell if the power is applied, or it is running on battery.
I was also thinking about having the program suspend when the battery gets below a certain point. I've done something similar on some Z80 systems I built back in the 90s.
That would be a great idea, and I was thinking the same thing while I was looking for the power signal going to the processor.
Quote from: granz on Aug 08, 2026, 05:35 AMThat would be a great idea, and I was thinking the same thing while I was looking for the power signal going to the processor.
The Z80 system I referred to had a low-battery warning, but then when the voltage dipped below a certain point, even for a fraction of a second, an interrupt was generated that did some clean-up, marked the status of the program, saved the registers and flags, and then
HALTed. Upon reset, the system would confirm voltage levels and restore the registers, flags, etc.
That system didn't do much (monitoring system), but was critical, hence the need for those safety routines. Even when I did stuff using Parallax Microcontrollers, I used battery backup with power-fail detection. Since 2007 most of that was solar-powered with an SLA backup. Wish I had the articles from my old website.
Sounds like a good power-fail plan, and a good way to resume upon power restore.
Yeah, I wish that both of us were able to recover lost data. If I ever do get my web site up and running again, I will definitely need to keep local backups.