Close

update 2: code overhaul

A project log for Zerowatch

An Arduino Zero compatible open source smartwatch

8bit-bunny8bit-bunny 07/24/2015 at 18:500 Comments

firstly, 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 :)

Discussions