-
update 3: framebuffer? + lots of apps possible now!
07/25/2015 at 09:41 • 0 commentsii have looked into creating a framebuffer for the zerowatch, and calculated the RAM usage it would take
128*128 pixels *8bit depth (8 bit unsinged int, aka 256 colors) = 16 kilobytes of RAM
128*128 pixels *16bit depth (16 bit unsinged int, aka 65535 colors) = 32 kilobytes of RAM
fun fact: the 256 colors (8bits) is a;ready half of the mcu's RAM on it's own where 16bit depth consumes all of the mcu's RAM!
so there will be no framebuffer on zerowatch sadly...however, if you want to, you can implement a 8bit depth one, but you'll have to lower the app RAM buffer to about 4 kb.
perhaps change somewhere in the future to a mcu with more RAM (perhaps an STM32f411)?
aside from that, i have started working on having multiple pages of apps in the shell, instead of one page max.
this allows up to 100's of apps on the system (if you can fit them into the flash ;) )! -
update 2: code overhaul
07/24/2015 at 18:50 • 0 commentsfirstly, i switched from the Adafruit SSD1351 lib to the ucgui lib, result: framerate a few times faster :)
then i thought: "hey.. if i put in a delay of longer than 1000ms in my main loop, the clock doesn't update for that second (using protothreads, and that library doesn't have real interrupts)
then i came to an idea, namely: digital pin 9 as a pwm output to a analog pin, and once the analog pin is low, the clock checks if it needs to update, so basically, i'm using a interrupt! :)
then i created an app in the ported microtouch framework, and found out that i can use system variables in the app's code, aka: a huge securiy leak(!), if i set a system variable to a wrong value, the watch might freeze, same goes for functions, like calling the main loop() in the application's loop (resulting in running the main loop in a main loop..)
one solution is to rewrite the ported microtouch's app framework code, but that's a bit too much work as of now, so i think i will go with an easier solution: adding a __ in front of every app's variable and function, that way they won't interfere with eachother. :) (though i need to get on rewriting the code sometime though.) (feel free to comment your solution!)
plus i started working on a homepage for the Zerowatch, and asked AtomSoft for a custom pcb (ncluding assembling), because that's way too complex for me, and my hands get all shaky when soldering (i also don't have enough place for a reflow oven)
lastly: i started using app inventor 2 and got my own messages working now, it notifies me when i get a text message :)
and most importantly: everything will be open source on release.
well, that's it for this update :)
-
update 1: demo video
07/21/2015 at 15:07 • 0 commentsso, i got the oled screen running, bluetooh parsing is done (thanks to the retrowatch code) and a basic app manager is done as well thanks to rossumer's microtouch
a demo video of what i have right now:
as you might notice, the screen is incredibly slow due to adafruit's unoptimized library, perhaps someone can help me out with setting up and changing to the u8glib?