I’m looking for suggestions / ideas for programs in MMbasic. Any & all suggestions will be greatly appreciated. All completed programs will be made public under my Github
I’m not sure if this would be interesting or fun to create, but it could have some creative challenges… It could also become a rather large and involved project. What about a database application of some sort?
Given the memory constraints of the hardware, and the large amount of storage space available on the SD, it might make sense to go with an old school fixed-length record scheme and relational database for storage/retrieval/indexing. Could even consider storing image data in the database, though the images would probably have to be stored as separate files that were just pointed to by paths stored in the database. Ditto for sound/music files. I’m not sure a truly “general purpose” database system could be created for the PicoCalc (because that would require all sorts of user interface customization, advanced query methods, and so on), but maybe some reasonable limits could be decided on and it could still be generally useful. (Back in the old days, just because a database was meant to be used as a contacts database didn’t mean you couldn’t also use it to keep track of your record collection or whatever, with some reuse of fields and maybe a bit of hacking, etc.) Some searching and/filtering of records would be useful too.
Given WebMite’s ability to host a simple webserver, it could also be interesting to use that hosted website as an interface to the database. It’s unlikely anyone would want to create all the data on the PicoCalc (a lot of typing on that keyboard!), but it could be entered via web forms. And whatever configuration options for the database could be set up that way too. Might even be possible to upload images or sound files via the web form. The interface on the PicoCalc itself could focus more on viewing/searching/filtering data, while the web interface could focus more on creating and entering data, though both sides could still support all functionality even if it wasn’t as fully featured or easy to use. If it made sense, there might even be an “admin” interface (password protected) for the web side that would allow creation and entering of data, and a “public” interface that would only allow viewing/search/filtering of data.
Might be interesting to see if there are clever ways to implement more modern database styles in such a limited memory system, but I’m not sure how feasible that would be.
Even at a very limited scale this would probably be a larger and more time-consuming project. But it’s the sort of thing that some folks might find useful, it’s a suitable “retro” application since there were tons of hobby database applications back in the day, and it would be a “meaty” project with lots of options for exploration and maybe some creative and unique solutions, given the constaints of the hardware. It might also be incredibly boring to work on though, and it’s probably best driven with a purpose in mind (like, what would you want to store in the database?), but I figured it was worth throwing the idea out here.
Pardon me if anyone has a hard time reading this, I did talk to text.
I like the idea of a modern-ish database for the Pico and you are correct on memory constraints. I suggested in the OS mega thread a few days ago about possible swap memory on the flash of the Pico? Is that possible to do it? Might make this project a lot easier or difficult depending on how much RAM it uses. Just to use it as a swap at most. It would be 512 KB on the flash. I tinkered around with database and database structures with python a few years ago. I understand how all of it works. I could definitely take a jab at a Pico database, I’m not so good at graphical programming for this device yet I would definitely make it open source for that reason alone. I think I’m going to start with a modular design and try and keep it under 30 KB for the framework of the database giving ample amounts of room for working with any data imported.
“It’s unlikely anyone would want to create all the data on the PicoCalc (a lot of typing on that keyboard!), but it could be entered via web forms. And whatever configuration options for the database could be set up that way too.”
Why complicate things? All you have to do is connect the PicoCalc to a PC via the USB cable and, use a terminal program on the PC. Voila! You can use the PC’s keyboard to type and upload images or whatever to the PicoCalc through the terminal program.
But why complicate things because now you are using 2 machines to do something that should take 1?
Ok, kidding aside. Figuring out what to do is always the hardest thing. How to do something is not nearly as hard.
I agree with the keyboard being hard to type on. I think the suggester was looking for a way to view data on the go rather than being hooked up to a computer. I’m starting this project today while I wait for my screens to be delivered. Will post updates as I go.
I didn’t see it as complicating things, as much as finding a use for WebMite functionality. Also, I was just throwing out ideas, and not listing requirements. A serial connection would work fine to allow using an actual keyboard.
I like the idea of carrying reference material around with me and of course I read a lot, so I’d like to see programs that display Kiwix zim files and epub formatted ebooks.
You reminded me of something I picked up from the Information Architecture community years ago – “putting the what before the how.” It definitely seems like technology focused folks, and developers especially, tend to think about the “how” first. And I get it, it’s fun to geek out about implementation details and languages, and whatnot. But that’s usually a recipe for disaster, since you really have to figure out what it is you want to build first, and what it is that that thing should eventually be doing, if you want to end up with anything that might make sense or be useful at the end. (Plus, if you have an idea of what it is you’re building, you might be able to see if there are people who might be interested in using it too. That’s true even if that person is just yourself.)
Some relevant stuff, though I couldn’t find the blog post I had in mind:
And yeah, there are lots of possible “hows”, and they can be chosen based on what makes sense for the “whats”, as well as existing knowledge, expertise, something you’re interested in learning and using, etc.
Not a programmer here. The only experience I have is with Arduino. I am attracted by the capability that open source hardware and software gives to regular folks like me to learn how these tools work. Since I discovered Linux many years ago I did distro hopping, even had 3 different smartphones with Ubuntu Touch and other Linux mobile OS installed, but Picocalc hit a sweet spot for me.
I’m still learning the BASIC language and what is possible to do and I’m more than thrilled!
I’ve already written a function plotter and posted on this forum, with a little bit of help from AI (which sometimes is more an impediment since you need to correct after its mistakes), but learning is all the fun. I’m improving the code with small increments and I’ll do a repost when is mature enough.
Started a Sudoku project, but abandoned it after a more developed code was published.
Next project will be a calculator. It’s PicoCALC after all…
Another program that I’ve written is representing prime numbers as concentric circles where r is the prime number and the circles are divided by r points equally appart, but for now I’m using trigonometric functions instead of complex numbers which satisfy the equation z^n=1. That’s another beast…
There’s a lot of potential in this little device and I can’t wait to see where the rabbit hole leads to…
I do most of my work outside my day job in Forth, and I find it fun to just write programs in Forth to play with graphics on my PicoCalc. These range from things such as the classic Mandelbrot set and Conway’s Game of Life to things like the classic “Matrix” screensaver demo and the Barnsley fern to things like testing the randomness of the hardware RNG by displaying random numbers generated with the hardware RNG on my RP2350 (which I have found are not very random at all for some reason, unlike those from the hardware RNG on the RP2040) as a histogram (this was inspired by a similar program in BASIC on this forum). They are not “serious” projects by any means, and I have no intentions of using my PicoCalc for anything “serious”.
I’ve never heard of Kiwix zim files I’ll look into it
From the Kiwix website: Explore Offline Wikipedia and Educational Content with Kiwix- Kiwix
“Kiwix is a free and open-source software that lets you access Wikipedia and other websites offline”.
There is a version of kiwix available for install on the uconsole and devterm (via apt).
The kiwix website also has a library section that has “books” for download e.g. wikipedia (english 109GB!!!), stackoverflow, pythonwiki etc etc! very useful for offline perusal!
Correct me if im wrong but mmbasic can only read upto a 32gb sd card?
Alright, first problem i see already is having massive ram limitations. .pdf & .epub use alot of compression which is memory heavy. Second i see is the actual usability of this, unless i cram a new font within the program were limited to the crappy 40col of the pico, i’ve yet to mess around with fonts on the pico so this might be my intro to it. Im going to start with a simple text viewer instead of a full “e-reader” program.
I’ve added both programs to the worklist on github & will be creating the folders for them when i have the frameworks complete. Current Worklist
The PicoMite built in font #8, or alternatively the Pico-8 font are, I’m guessing, the tiniest semi-legible font that could be used on the PicoCalc. With those, you can get 80 columns wide by 53-ish rows tall on the screen. But that’s very tiny and would probably be painful to read.
The 5x8 font for zeptoforth (also at that link above) which I adapted for PicoCalc lets you do 64 columns wide by 40 rows tall on the PicoCalc screen and is a bit more legible, but I’m still not sure it would allow for comfortable reading of a lot of material. Larger fonts like the default editor font are easier to read, and would give extra space for the possibility of adding styling if using it as a template for a new font(s) (see below).
The other thing to consider with PicoMite fonts is there’s no concept of bold, italics, underline, subscript, superscript, etc. And there’s only a limited number of symbols. That’s generally fine for most programs, and would be ok for a “notepad” like text viewer. But if you want to have something more like an ebook reader, that missing functionality might be needed, or at least useful. Implementing it would complicate things.
Two possible routes (though I’m sure there are others) would be:
- Create a custom font, or potentially several custom fonts (since I’m not sure one could contain all the characters), and embed the bold/italics/underline/etc. effects in the font characters. Then you could still use text mode (or optionally graphics mode) to display the fonts. I’m not sure if you can mix fonts when using them in text mode though, so that may be a problem, and it might still require graphics mode if you can’t easily mix and match in text mode.
- Instead of actually making the font effects look like they should, use the graphics mode “scale” parameter to, say, increase the size of bolded text, or shrink the size of italics text. Alternatively, use different colors to denote the different styles. Or use some combination of the two. Scale would also allow you to have headings and things that need to be larger, but it would complicate things since you’d need to manage the (x,y) location of every bit of text and ensure that nothing spills into anything else or writes over the top of anything else. That would be a lot of tracking calculations, and scrolling the page would need to be taken into account too, unless paging was enforced.
My guess is that trying to stuff all the effects into a font, or fonts, might be the best option because then you ignore scaling altogether (and all the position management it would entail). Might still require rendering in graphics mode, but keeping everything the same size, with embedded styling and optional color coding would probably be enough to make it a better reading experience. Still wouldn’t be close to an ePub reader, but it might be a decent compromise. Easiest thing might be to use color coding for all styling, and not bother modifying the font at all and just have a “help screen” available somewhere.
I dont know if this is allowed on this fourm but i’ve recently created a programming discord server, anyone is free to join regardless of skill level. M57
Update for PicoPub, seeing the pico cant handle reading .epub or .pdf files I decided to make it read .txt files. Theres plenty of .pdf to .txt file converters out there, I’m not so sure about .epub to .txt though. I’ve spent the first 30 or so minutes of the night dealing with the font size issue, seeing I cant display more than 30 lines of text on the screen at a time i decided to go with a text scrolling / page function. The page function allows for any given .txt file to have a maximum of 10,000 words, words are then wrapped (depending on length of the sentence) to the next line. The last 3 hours have been spent programming it, so far I have, a bookmark & highlight feature, jumping to pages, and the ability to save both bookmarks and highlights to a .dat file on the working directory. I’d like to enhance the bookmark feature to re-open to the last page when the application closes (future functions). There currently there are 6 key commands, N: Next page, P: Previous page, J: Jump to line / page: Up/Down: Move highlighter & B: set a bookmark. I have 8 more key functions I’m going to implement before releasing to the repo, M: Show bookmarks & Jumpto, [: Next highlight, ]: Next bookmark, Q: Save & quit & H: Show help.
NOTE: Seeing I’m still waiting on my screens, I cant confirm that the text wrapping actually works, in my terminal emulator it works.
True, it would be interesting to see what can be achieved with the current hardware. The hacker spirit is alive and well in these forums, people doing stuff because they can! I’m a noob with regards to programming, and will follow along as far as i can!
I was fairly new to basic and completely new to MMbasic. Here we are 4 months in and i have a whole library of software I’ve written for the PicoCalc. This community works wonders if you have questions almost everyone will chime in.