Tweets
Replying to @cedricamaya and @adafruit
Oh man, I forgot about those! I was going to write a whole series, a curriculum around getting to understand how to build the Open Book. but the last post was March 7, 2020 and we all know what happened a week later.
(original)
Replying to @yacky_yam
This is on the Pi Pico, as I’m closest to having a final design to share there. I’m scrapping the ESP32-S2 book and planning a new design around the ESP32-S3 MINI; I have some ideas on how to use the Pi Pico’s second core, so it just makes sense to target a dual-core ESP32.
(original)
Replying to @IShJR and @adafruit
Key points though are to implement a Task that turns hardware input into Events, and a Task that updates the display based on the area of the Window requiring an update. The sketch in the gist demonstrates both of these, as tailored for the MagTag.
(original)
Replying to @IShJR and @adafruit
Steal away, the goal is for it to be uncoupled! The gist I linked contains a snapshot of where Focus is at right now, tho it’s definitely not stable yet. I may release it as an Arduino library once it’s closer to where I want it to be.
(original)
This afternoon I decided to write a second app using Focus, the framework I’m building for the Open Book. This project tracker app for the @Adafruit MagTag demonstrates Views, ViewControllers, Actions and much more; still a ways to go, but it feels usable! https://gist.github.com/joeycastillo/ef2b449d40eaa14cc126c3248621cad4#file-magtag_focus_projecttracker-ino
(original)
unbelievably I’ve made it this far in Focus without the ability to mark views as hidden. No longer: added an isHidden property, and used it to toggle the display of a battery and a USB icon.
(original)
today in Focus i invented view controllers, and now i need a way to communicate happenings from view controllers to other parts of the application. i’m trying really hard not to just reinvent NeXTSTEP’s Application Kit circa 1994, but screw it: there’s a reason the hits are hits.
(original)
Replying to @bradanlane
Honestly I don’t know about efficiency, but I’m def optimizing for ease of coding here. FWIW I love working with C: the whole Sensor Watch firmware is in C, and I think it’s reasonably easy to work with. But the Open Book has a lot more going on, and I think C++ makes more sense.
(original)
Replying to @josecastillo
where once actions were pointers to bare callback functions (with a reference to an Application that we had to static_cast), now we can register instance methods of any object as event callbacks. This opens the door to a less monolithic application design. https://github.com/joeycastillo/libros/commit/f04a4726ff463de8adb2f46dc210f6571f3f2821
(original)
an update on Focus: I have discovered std::bind and now I am unstoppable. https://embeddedartistry.com/blog/2017/02/01/improving-your-callback-game/
(original)
I know not everyone is on board with “fuck the police”, but can we at least agree on “fuck these police in particular”?
(original)
Replying to @josecastillo
aw man I forgot alt text. A store display with Star Wars themed merchandise, including coffee mugs in the style of several droids, a Yoda paperclip holder and a tape dispenser styled as a downed AT-AT walker.
(original)
Star Wars the travel mug! Star Wars the lamp! Star Wars the tape dispenser!
(original)
Replying to @mr_rythom and @Ford
I love the look!
(original)
Replying to @josecastillo
this 9-pin pinout — again, inspired by Adafruit’s Monster M4SK — has managed to have some staying power. I’ve used it in everything from a hat to a ring to a candle, put it in Sensor Watch, and used it for this gadget, whatever it is :)
(original)
morning project: tweeting about Pycorder yesterday reminded me that I wanted to do another rev. It works fine, but I wanted to improve the ground return with a pour on the back, and add some docs. Still think it’ll look great in After Dark! OSO-PYCO-A1-03: https://github.com/joeycastillo/pycorder/tree/main/pcb
(original)
Replying to @databasescaling
very cool! Also I’m definitely going to publish a rev 3 of the board actually… now that I discovered that ground return problem, it’s worth addressing it for folks who want to build their own :)
(original)
Replying to @databasescaling
Word of warning: I got a bit cute with the ground pour so it’d look good in After Dark; as a result I’ve noticed it sometimes browns out momentarily when going from battery to USB power. If I did another rev, I’d add a big ground pour on the whole front and back. (maybe hatched?)
(original)
Replying to @databasescaling
DigiKey has them! Search for LS027B7DH01A. A bit pricey, though, which is why I never imagined making this a gadget for folks to buy. If you want to DIY it though, the schematics and board files are here! https://github.com/joeycastillo/pycorder
(original)
Replying to @josecastillo
Still needs some work at (and on) the margins, but I’ve got pagination almost working! The idea is we do a dry run of word wrapping the entire book — which, yes, can take a minute — but then you have chapter headings, a table of contents and random access to any page in the book.
(original)
Replying to @josecastillo
crash log analyzed, hard fault addressed. always null-terminate your strings, kids!
(original)
Replying to @josecastillo
these memory displays are so sharp!
(original)
Love debugging a device that I made with a device that I made. Pycorder × Open Book, the former dumping info on a hard fault in the book’s pagination subroutine.
(original)
IT’S HAPPENING!!! https://twitter.com/MakeAugusta/status/1537487352611758080
(original)
Replying to @spencerbyw
There’s an also an accessibility and a permanence aspect to it: I like the idea of a canonical format for written works that’s immediately comprehensible and unlikely to become stale. I sense that plain UTF-8 text is a format that’s going to stand the test of time.
(original)
Replying to @spencerbyw
Pretty much just that: an EPub is a ZIP which means unzipping, and then once unzipped you’re parsing a whole bunch of HTML files, held together by a manifest and a spine in another XML-type file and it all becomes really complicated. Whereas text is just text; anyone can read it.
(original)
The next step on this journey is pagination, or breaking a big text file into pages to flip — but I have to pause to share this lovely modal. It’s a hack, but if I set the background of the whole window to EPD_DARK, it looks like I’m doing alpha compositing on this 2-bit e-paper!
(original)
Replying to @josecastillo
(the script also emits ASCII “Record Separator” characters before each chapter title. Some text editors ignore them; others render them as an unknown character box. Still plain text! Just making use of some characters we haven’t used much since the 1970s) https://gist.github.com/joeycastillo/a7d06377fdc60c53bc9c736db677a463
(original)
Replying to @josecastillo
to do this I had to hack together a quick Python script to convert EPUB to plain text with front matter. You can try it yourself right now actually! For now, only use EPUBs from Standard Ebooks; I tried a few from Gutenberg, and they seem a bit wacky tbh. https://gist.github.com/joeycastillo/9e48d534e7f61dc59b6d0c1b82c0ed1a
(original)
new Libros firmware: reading book metadata from plain text files and storing it in a database. The parser is fragile as all get-out, but it starts to prove out the viability of treating a book as plain ASCII text with some front matter in the style of Hugo or Jekyll.
(original)
Replying to @timonsku
oh hi!
(original)
Replying to @josecastillo
this photo also shows the new “CellSelectionStyleIndicatorLeading” style for the rows of the table, which allows for a smaller (faster) 8-pixel-wide partial update window along the left side of the screen. Definitely quicker than inverting the whole row. https://github.com/joeycastillo/libros/commit/cf2b65893f0f6a39742447ba89b5ddfb1b222833
(original)
Replying to @josecastillo
BitmapView. A few more lines. https://github.com/joeycastillo/libros/commit/3cde8182f0b80897de300f3f7c994acbacba9959
(original)
Replying to @josecastillo
feels a bit silly to share what it looks like, since it’s so similar to what I’ve had in the old book firmware since forever. But doing it in this object oriented way is a definite win.
(original)
the Focus framework is coming along nicely. I’m rather pleased with how easy it was to implement a progress bar at the bottom of the book view: about a dozen lines to implement the widget, two more to add it to the view hierarchy and one more to update it. https://github.com/joeycastillo/libros/commit/b1fc4b3b54093d74761f53dc34dd9a5edab23379
(original)
Replying to @josecastillo
decoded just a bit. Recursively iterating through a view hierarchy to find the deepest focusable view — the practical upshot of which is, now I just have to call window->becomeFocused() and it automatically highlights the first book in the list.
(original)
I will not lie to you: I use printf debugging often, and it is often great.
(original)
we’ll meet again.
Do know where; don’t know when.
but I know we’ll meet again some sunny day.(original)
Replying to @twilliability
It is! https://discord.gg/EbtpPK2R
(original)
Printing the first bit of documentation for the Sensor Watch Temperature Sensor board. With thanks to GinSolo on the Oddly Specific discord for his help with translation; I would honestly not be able to do this without the support of the community.
(original)
RT @spencerbyw: Just finished my write-up on building the probability watch face for the Sensor Watch by @josecastillo! My favorite part is…
(original)
Replying to @bradanlane
“Fuck everything, we’re doing five webs.” https://www.theonion.com/fuck-everything-were-doing-five-blades-1819584036
(original)
Replying to @mpeg4codec
I love the idea! But for minimizing BOM cost, I’d love to someday have an injection molded enclosure that just snaps together instead of requiring screws, so I’m exploring that with the 3D prints right now. (ideally it could also unsnap easily for user serviceability)
(original)
Love me some silkscreen documentation! https://twitter.com/AlperenAkkuncu/status/1535287992310448135
(original)
Replying to @tahnok
I was showing these to a sculptor friend and he pointed out how many interesting form factors you could come up with around the device. Like, why not have a book shaped like a cloud, or a Game Boy, or an oversized Tamagotchi?
(original)
Replying to @tahnok
I think right now my instinct is, I need to come up with the minimum viable case so I can ship the kit and get hardware in people’s hands. I hope that once the hardware is out there, folks with more skill than me will riff on it and come up with something better maybe?
(original)
Replying to @josecastillo
still haven’t quite figured out how to hold it together, but I’m having a thought now in terms of press fit. The tabs would need someplace to snap into in the back, but the PCB in this scenario would be flush to the edge of the slab. So I’ve added these 1mm cutouts for some tabs.
(original)
I never could figure out how to print the bumpy case in two parts without the backside turning into spaghetti. So for now my thinking: just make it a slab as thick as the thickest point, the battery holder. AAA’s aren’t the worst; it still measures just under 1.7 cm thick. https://twitter.com/josecastillo/status/1533194874358583303
(original)
Replying to @moxnr
There’s a battery voltage watch face, but alas it’s not compiled into any of the prebuilt firmware images. Still it’s easy enough to add; I don’t have a tutorial for building custom firmware yet, but once you have the toolchain installed, it’s just adding 1 line to a config file.
(original)
Replying to @moxnr
FWIW, the sleep mode is configurable in all of the firmware images: if you want the watch to never sleep, you can set that setting in the Preferences watch face. With the new power optimized firmware the battery should — again, in theory — still last all year long.
(original)