Tweets
Replying to @supersat
I have a phototransistor sensor board, alas I’m not clever enough to use it for more than analog light sensing as of yet. Definitely want to spend some more time on it once some other things are further along.
(original)
Replying to @supersat
Very true, or I need to figure out a better way to get data into the watch than button mashing or taking it apart…
(original)
Replying to @josecastillo
in practice that looks like 36 files like this, each with hundreds to tens of thousands of arrays of floating point constants. I should have done some more research before running full-speed, Wile-E.-Coyote-style toward this idea. 🙃
(original)
Replying to @josecastillo
This makes sense I guess. These lunar calculations are based on a theory from 1983 that involves, per a NASA document, “a total of 37862 periodic terms, namely 20560 for the Moon’s longitude, 7684 for the latitude, and 9618 for the distance to Earth.” https://eclipse.gsfc.nasa.gov/SEcat5/ephemeris.html
(original)
Replying to @basetwojesus
it’s like a superpower!
(original)
Replying to @basetwojesus
Middle mouse button click and drag!
(original)
Replying to @josecastillo
LOL ok wow that was a fun detour but this is monumentally not gonna work. I can include 1 or 2 celestial bodies, but trying to include all the planets overflows my chip by 680k. Adding the moon overflows by 4.8 MEGABYTES. I guess this library wasn’t meant for embedded systems. 😅
(original)
Replying to @josecastillo
total side note, have I mentioned lately how much I love Visual Studio Code?
(original)
Replying to @josecastillo
TODO: math
(original)
Replying to @josecastillo
(the UX, in theory: you’d land here & select a celestial body with the Alarm button: ME, VE, MA, JU, etc. Then a long press on Alarm calculates the relevant data, which you can flip through with short presses on the Light button: RA, DE, RIse, SEt. Maybe ELevation over horizon?)
(original)
Revisiting this today; if I _can_ have a solar system simulator on my watch, why _shouldn’t_ I? Not sure if this is the right terminology though. I think the goal is to be able to show right ascension and declination for each planet and Luna. Is that an orrery, or something else?
(original)
I backed this project and I’m super stoked for it! More and more, I love gadgets that I can set and expect to “just work”. A device that shows useful data, and runs untethered for 1-2 months on a single battery charge? Awesome. Way to go, @darianbjohnson! https://www.crowdsupply.com/phambili/newt https://twitter.com/darianbjohnson/status/1482499454666215431
(original)
Replying to @win_icons
first thing I thought of:
(original)
Replying to @asciijungle
The thing is, I want to be able to ship folks a board with Movement already on it. That way if they don’t want to code they don’t have to. It’s not bad tho. I have a plan. Only requires setting 11 digits; two decimal points of precision gets you within a kilometer of your target.
(original)
Replying to @josecastillo
As a result (third), there’s now a branch of Movement that supports astrometry and celestial mechanics, which I sense will help me answer questions like “What time and where is Jupiter rising tonight?” or “Is the full moon in Cancer this January?” (It is.) https://github.com/joeycastillo/Sensor-Watch/commit/6247607b0cb26a8c00a6ed3f3cf6b138fdf8c804
(original)
Replying to @josecastillo
Second: I forked libnova, and made the (admittedly small) changes required to get it building with the ARM Embedded toolchain: https://github.com/joeycastillo/libnova/compare/655bcd1aec9da10bdb56e6499e2639fa3a953695..45064f6855ee61d4c33fa0fe9b4eff8a1924a759?expand=1
(original)
Replying to @josecastillo
actually, scratch that, there were three more wins than that today! First, we merged in @tahnok’s countdown timer watch face, which gives the Sensor Watch its first alarm feature: https://github.com/joeycastillo/Sensor-Watch/pull/29
(original)
Replying to @josecastillo
for the moment it only displays sunrise and sunset in London, since I need to build a UI to let the wearer set their location. And I’m not sure if including the seconds is needlessly extra. Point is: it works. https://github.com/joeycastillo/Sensor-Watch/commit/baf25aaa7a7f8ff673bbe805963b242c0eb52306#diff-97486b40f0b5b14dc7ef55d8b7b6b4e6900ab97e4400060c7287dc4f6dbf2d76R36
(original)
Replying to @josecastillo
This feels like a reasonable amount of win for one day.
(original)
Replying to @tahnok
whoa that didn’t occur to me, that’s a great idea! The main improvement I was going to try was to make a click toggle the segment as well as any linked segments, but truth be told I don’t know (or particularly like) Javascript, so it hasn’t been at the top of my list.
(original)
Replying to @willianpaixaoo
I agree 100%. Honestly I’m not even sure where this Makefile came from or how it came into our lives. but it definitely feels like the project has outgrown it.
(original)
Replying to @tahnok
(you can also click the light button to toggle the green LED!)
(original)
Replying to @tahnok
It’s a bit tedious, but there’s a hidden feature in the segment map where you can click on segments to toggle them off and on. Note though that it doesn’t toggle all the linked segments, so you can make screens here that wouldn’t work on the real hardware. https://joeycastillo.github.io/Sensor-Watch-Documentation/segmap.html
(original)
Replying to @josecastillo
(it’s also -24° Celsius there, which makes me feel slightly better about biking home tonight in Brooklyn’s balmy -8°)
(original)
Replying to @josecastillo
there’s a fun edge case at extreme latitudes where the sun is always above or below the horizon. With limited segments to convey this concept, I think this is pretty decent. In Point Barrow, Alaska today, the sun is down all day and all night. (sunRIse on the 15th: none)
(original)
Replying to @josecastillo
yeah, that’s definitely better. A little over a tenth of a second to calculate everything, without having to ramp up my processor speed at all. Now I just need to design a UI for the watch face!
(original)
Replying to @josecastillo
OK. Putting a pin in simulating the astrodynamics of Earth & Sun, and instead reorienting myself around a well-regarded, public domain sunrise/sunset implementation. It’s also period-appropriate: the code dates from 1989, the year the F-91W was introduced! https://stjarnhimlen.se/comp/sunriset.c
(original)
Replying to @getur
I had been using an Atmel Power Debugger, but now I’m using a Nordic PPKII, which feels ideal for my purposes: https://www.adafruit.com/product/5048
(original)
Replying to @josecastillo
(I’m deep down a rabbit hole)
(original)
“For further information, please see the U.S. Naval Observatory’s page Astronomical Data Used for Litigation.”
(original)
Replying to @travisgoodspeed
Yea the more I talk through it, I think maybe for sunrise and sunset, I just need a more lightweight algorithm. tho I may keep libnova around for folks who want to do more interesting space-oriented watch faces.
(original)
Replying to @travisgoodspeed
That could work; once a week, calculate the numbers for the following week and stash them in RAM? I’m just thinking about power budget: 2.3 seconds at 3 mA, 365 times a year, that’s 0.7 mAh, just under one percent of my coin cell capacity for this one feature…
(original)
Replying to @josecastillo
huh. overclocking the chip to 48 MHz, the calculation takes 2.3 seconds. Which is a long time to wait, and a long time to be burning what I assume is a lot more power. Maybe a supercomputer-oriented astrodynamics library isn’t the way to go to calculate sunrise and sunset?
(original)
Replying to @josecastillo
PROGRESS! For power reasons, I’m running the SAM L22 in the watch at 8 MHz. But I can change that on the fly. Getting rid of some redundant calculations and bumping the speed to 16 MHz, I’m down to 4.4 seconds. (It can run up to 32 MHz, but I need to do some more setup for that.)
(original)
Replying to @NiVZ
This is very cool! Not sure if it’s exactly what I need, but I like it. Also, this gave me a chuckle:
(original)
Replying to @josecastillo
One challenge: I think this library was designed for hardcore precise math, like if you wanted to run it on a supercomputer to do celestial mechanics (there are references to the Cray-2 in the config file!). As a result, the math here takes about 10 seconds. Still, it’s a start!
(original)
Last night I had a few drinks and said I was going to add astronomical calculations to Sensor Watch. Fought off a mild hangover and got to the workshop around 10:30. Thanks to the brilliant libnova library, it’s barely noon and I’m already calculating solar coordinates on device.
(original)
Replying to @josecastillo
Broke my streak for a couple of days, but:
Wordle 210 3/6🟨⬛🟨⬛⬛
🟨⬛🟨🟩🟨
🟩🟩🟩🟩🟩(original)
Replying to @josecastillo
Battery test, day 67: 3.0V. This isn’t relevant to the test really; it just occurs to me that on day 0 I’d made 17 of these by hand; by day 10 we’d manufactured 110; on day 63 we hadn’t yet launched, yet by day 64 we had a few hundred folks stoked to own one.
This happened fast.(original)
Replying to @josecastillo
it’s also LGPL, which i think means i can incorporate it into our MIT-licensed Movement framework without breaking anything from a legal standpoint. And it’s also all written in C, which means I can put off facing my Makefile demons for one more week at least.
(original)
Replying to @josecastillo
this actually isn’t entirely a joke. I’ve long wanted to add sunrise and sunset calculations to the watch, but I didn’t want to do it one-off; then recently I discovered libnova, an open source library for celestial mechanics, astrometry and astrodynamics. http://libnova.sourceforge.net/
(original)
This week was wild successful and I feel like we accomplished a lot, but I also barely had time to write any code for the watch. So next week, I’m setting a goal: if I can’t get the ML stuff compiling, let’s code an orrery. https://en.m.wikipedia.org/wiki/Antikythera_mechanism
(original)
“Anything can be made.”
(original)
Replying to @dcelectr and @bradanlane
Portability mostly, it only runs on windows and I’m a Mac oriented guy. But it does occur to me, maybe I could have it generate a Makefile for a C/C++ project and crib from its notes…
(original)
Replying to @bradanlane
I’m just on the command line, writing straight C and compiling it with the GNU Arm Embedded toolchain. Which has worked well so far! my challenge today is I want to add C++ to the mix and I don’t know what incantations it expects from me, except that it involves a lot of % signs.
(original)
why are makefiles. HOW are makefiles. ugh.
(original)
Replying to @tomfleet
I like this one!
(original)
Replying to @pencerw
hope you don’t mind, I hacked ur website a little bit to get these high res pics. I think this makes me a cybercriminal in the state of Missouri?
(original)
I feel like I talk about our workshop, @the_prepared, a lot these days. It’s a wonderful place. We’ve got gadgets, sure, but more importantly we’ve got _community_. Are you doing interesting hardwarey type stuff in the NYC area? Come rent a bench; join us! https://theprepared.org/workshop
(original)
Replying to @dqzlol
I’ve gotten some pointers 🙂
(original)