Thursday, December 1, 2016

It's a Very Silly Universe

I'm looking forward to finishing up my Tomb Raider/SG1 fanfic. Because both properties are really rather silly, when you look deep into them. The Stargate universe has trouble working even by its own internal rules. It fails dramatically to work within practically anything that we know of the real world. The Tomb Raider franchise gets off a little easier, but perhaps only because it says so very much less.

I just got two more Holocron orders, and I've been tinkering on a "talking" Holocron, and the question has arisen what the heck those things are and why they exist in the Star Wars (no longer Extended) universe. Which is also a very silly universe.

I do like one thing about that universe, though. And that is that it has a sadly believable history. From all that was said in the first, original Star Wars (now "A New Hope"), all was peace and light under the benevolent leadership of the Republic for untold years. Then the Empire came in...creeping in through what one imagines were years of slippery slopes and questionable decisions and the inevitable decay of all empires -- one gets the impression that Lucas had been reading a bit of Spengler along with his Campbell. The Empire is all Luke knows, suggesting it has been around for long enough to Winston Smith records and memories alike, but it doesn't last much longer than it takes for Luke's voice to change. 

In the various extensions, whether the Triumph of the Will of Darth Emo's buddies in the latest movie, or any of the Sith and Mandalorians and so forth in the various and sundry games, animated movies, and whatever, a much different shape arises. The timescales may be ridiculously long, but the overall shape of the galaxy is war after war. One culture, one philosophy, rising for a time, then being overthrown by another. Endlessly, until wreckage litters thousands of planets and thousands of legends are spread among the stars. It lives up to its title, then. 

Because that is the shape of history as I see it. If one focuses in on, say, Rome, one sees the rise of a nation and experiences its power and accomplishments. One even views the world through the map of its territories, a globe centered on the Greenwich of that particular empire.

Take a broader view, though, and every state falls again, is conquered or subsumed. It becomes instead endless waves, an ebb and flow with one empire rising to prominence for a while every now and then until the pattern falls back into chaos (often, it seems, stirred into new upheavals by the latest product of the mysterious Nomad Factory).

And this is what movies like "The Force Awakens" seems to show of us these Stars at War. For all the ridiculous science and inconsistent technology and B-movie antics, this, at least, rings true.

Wednesday, November 30, 2016

Bird

I can stumble through a tune now on the fiddle.

I take it to work with me. I don't always get the two scheduled breaks, I can't always practice on those breaks (sometimes I need to use the time to make a call or have a snack or something), but I still average fifteen minutes of practice every day.

Not a lot. But that's every weekday, plus I pick it up at least once on the weekend. And it adds up, bit by bit. Eventually even Diamond Mountain gets ground down.

Now all I need is more things with a good Bird Quotient. Unfortunately programming and writing don't make it. Fifteen minutes isn't even enough to figure out where you left off.

Tuesday, November 29, 2016

Stark Envy

There is a lot to envy about Tony Stark. But what I mean in this case...well, several scenes (in the first movie especially) sum this up well. He's in his man cave, elbow-deep in the high-tech equivalent of grease. He's unshaven, he hasn't eaten, he's pretty much only keeping himself going on beer and hard rock.

But he's still going. He's thinking, he's innovating, he's building.

I can get about four hours at a stretch. Maybe six hours total in any given day. The rest of the day I'm spinning my wheels. I can stare at the screen or sketchpad, shove my nose into the books...doesn't matter. That four to six hours is all that I have available to actually, creatively, problem-solve.

Last night I got hauled off to an unexpected rehearsal. Before it started and between acts I worked on the misbehaving Holocron software. It took me something like an hour of actual hands-on-keyboard to see where I'd screwed it up this time.

There's a flag that sets the pulse direction, up or down. Two blocks that test for flag condition then execute various things (mostly, setting a new target value for the LEDs, either max bright or min bright). Oh, yeah. And when everything else is done they flip the flag.

Except I was getting worried about undefined behavior in some of my "if/else" loops. So I switched out the "else" block for an implicitly defined "if" block.

Strip out everything else, all the interior loops and tests and function calls. What did I just create?

if (toggle == 1)
{
toggle = 0;
}
if (toggle == 0)
{
toggle = 1;
}

Yes; in this case, "if/else" was a better logical construct, exactly because the "else" statement isn't evaluated. It doesn't run unless the conditions to run the "if" statement are false.

And that's the sort of stupid error I'm trying to fix in my Holocron software. Because most of that work has not happened in those four golden hours, but during time when I'm struggling to try to concentrate at all.

Sunday, November 27, 2016

Ozzie who?

A quiet Sunday morning. Will be meeting friends for brunch in a few hours. I put on some coffee, grabbed the apple turnover I purchased on impulse yesterday at the bakery cafe across the street, and flipped a Wes Mongomery CD from my binder of random jacketless CD's into the player a neighbor gave me when she moved.

And...perfect. Sunlight is breaking through the overcast, there's just the slightest nip of fall in the air, and I've got the day off to relax. I'm happy.

This is what we give thanks for. These moments of grace. It is never the life you expected, certainly not the life you planned, but it is the life you have and, all in all, it isn't bad.

I've been lucky enough to travel a little, and there are certainly those moments of awe and those moments of connection with the rest of humanity. I've spent much of my working life in live theater and have had the experience of being part of creating those moments when the emotions and the lighting and everything comes together and time stands still at the cusp of that final chord. But I am especially thankful that I have family and friends, and as wonderful as the times of lively debate are those moments of quiet comfort when everything that really needed to be said is already said.

Rich or poor, sickly or robust, farmer or philosopher-king, eventually we are all Ozymandias, the legacy of our life but a pair of broken and confounding feet. So treasure those moments of grace. And it is not a bad thing, either, to live your life in a way that allows them to happen to others. Share kindness, and friendship, and love. Share music and art. Know that in the simplest act of boarding a bus or serving a cup of coffee you may be part of some other person's perfect moment. Take pleasure in the pleasure of others because, that, too, is a moment of grace.

Thursday, November 24, 2016

Whadaya mean, "too sensitive?"

Monday I did a long workday, went to the gym, worked on the Holocron, went out for dinner, and still had time for a few minutes of fiddle practice.

Tuesday I was sore, nor did it help that I had to climb the walls of the theater (pretty much literally, using rock-climbing moves up the unistrut to get to the things I needed to adjust). But still got the Holocron work and the fiddle practice in.

But I am so glad Wednesday was a short day and the next four days are off work.



I needed to dial in the sensitivity on the touch sensor before I moved on to the last parts of the software. And that took four days. And the solution is a software cludge. 

The theory is simple. Let current leak through a high-value resistor into the parasitic capacitance around an input pin and associated antenna until it charges and trips the pin. Measure the time; that's the total capacitance. 

A human body in contact with, or even close to, the circuit changes that time and you can thus detect it. I can get the circuit to detect a hand moving six inches away.

But not in a stable way. The values fluctuate too much, including the sensitivity climbing up steadily over time. The touch I'm looking for is getting lost in the noise.

And two other problems. The sensor wire is inside a sealed acrylic cube. So the ground floats when it is used in battery mode. And the sensitivity goes way up when it is tethered via USB. So my software cludge looks at the detect events and if they are way, way above the default threshold it assumes the Holocron is on USB and flips to the higher threshold setting. And I'm forcing auto-calibration at frequent intervals. And I'll probably write in a masking routing to prevent trips from coming too close together.

(That's more RTOS stuff there, of course. The Holocron is constantly feeding illumination level and color updates to the neo-pixels, meaning you have to use counters and/or interrupts instead of relying on delay() to tweak the timing.)

On to a new "Talk" animation, and take at least a weak swing at the user programming buttons. I've got the first six boards soldered up now and I have at least that many orders waiting to be filled. I'm glad I'm smart about this and have refused to accept payment until I'm ready to ship. (Because I still have to run out to the lasers to cut more pieces, too. At least the designing is finally done on that.)


Oh, and I just ran into the cutest hack on Hackaday. I'm already leveraging the fact that you can reboot the Holocron merely by tipping it far enough to activate the tilt sensor. But with a capacitor on an I/O pin, you can detect if the sleep interval was short or long. Meaning different behaviors depending on whether it has just been turned on, or if the user tips and restores.

And, yes, I was tempted to give up on the capacitive sensor and use this to trigger the sound effects on the "Talking" Holocron. But it made it a little too much like a Moo Can.

Saturday, November 19, 2016

Cold

It's cold out. Rainy also.

Good day to spend inside prop-making. Where I'm chasing down cold solder joints. Perhaps I need to scrub my PCB's before I start soldering on them. Or on the revised board (which I thought was complete until I thought of adding pins for a "talking" version), increase the annular rings on some of the critical pads.

No failure yet on any surface-mount component. But the hand soldering has thrown up two USB jack errors and even a couple of loose joints on the LEDs.

Oh, yeah. Talking. There's an Adafruit board that will trigger 10 consecutive (or random) sound files when a single pin is held low. Unfortunately they discontinued the version with an on-board power amp, which means I need to find space on the Holocron for two additional circuit boards. This, and even more ribbon cable, is so aesthetically displeasing I don't really feel like making this a standard option. After all, this is why I went through all the effort to make a single stand-alone board that combines charge management, USB hosting, and LED controller:


Also aesthetically displeasing is the sound. I experimented with the drivers I had lying around, and I needed to pump up to three watts into a quality driver before it could push its way out of the acrylic box and sound half-way decent. I've gone and ordered another of the surface mount transducers that failed me on the raygun project --


-- because anywhere else would create at the least a nasty shadow and possibly require a hole in the box as well. Besides, sound coming from a hole sounds like sound coming from a hole. It is a better effect if it sounds like the box itself is making the sound.

Pity I happen to know a little acoustics (and cabinet design). Because what this really calls for is a ported enclosure:


But that totally changes the look of the Holocron. And this is not a time to think outside the box. I've spent way too long refining on this particular box. It is time to brave the rain, visit the lasers and cut enough pieces to start shipping complete Holocron kits. (I have just enough to make one complete kit now, and I might assemble it myself just as a final check of the latest round of adjustments).

Or solder up the last of the current run of circuit boards. I stopped dead when I ran into odd USB behavior, but now I know what was going wrong and can fix it. I should probably solder up a complete "talking" Holocron before I order the version 1.1 boards, though. There's just barely space to put a couple more terminals for that...



(Oh, yeah; there's alternates. Best is go with Teensy and the Adafruit audio adaptor daughterboard for it. Skip USB hosting and in-place recharge and just put a string of Neopixels in for lighting. The Teensy does the heavy lifting of not just sound playback but DSP to equalize it. But that's costlier, still messy, takes up even more space, and requires I spend time programming.)

Bunny of the Week

The Great Pyramid of Cholula.

Under a 14th century Spanish Colonial church (a major pilgrimage destination) and covered with so much earth and other structures it looks like nothing more than a tall and regular hill lies a massive pyramid.

Begun somewhere around 200 BCE and built in stages over a thousand years, this elaborate pyramid complex is half a kilometer per side, larger in base and volume than the Great Pyramid of Giza, making it the largest monument in the world. Tunnels and passages wind through the structure; archaeologist have uncovered over six kilometers of passages so far. It is of course richly decorated, including fantastic murals, elaborate stone carving, and there are also multiple human burials.

And it is built on top of a cenote. Which, to add just that extra level of fantastic (something else I learned within the last couple of days) the distinctive cenote of Mexico's Yucutan Peninsula (deep circular pits where the surface has collapsed into massive limestone caves) are concentrated in a ring of shocked and fractured limestone that is itself a remnant of the Chicxulub Impact (the probable cause of the K-T extinction event of 68 MYA). These cenote are often connected in strings of caves, following the flows of an underlying aquifer which extends all the way to the sea.

Oh, yes, and just to put the Ancient Aliens firmly in the mix, an old name for the site is Acholollan (Nahuatl) meaning "place of flight." And, yes, the suggestion has been made that mysterious older inhabitants did just that. Perhaps their planet needed them.


So. Largely un-excavated (although quite well known and, like any ancient monument you've heard of, a major tourist destination), layered down through history from Spanish Colonization to late pre-contact to the height of the Mayan Empire to truly ancient caves to a catastrophe from tens of millions of years ago. Extending deep underground from the modern excavations to excavations by treasure hunters and seekers after building materials back through the Colonial age at least, to deep passages to natural tunnels to deep underground rivers stretching all the way to the sea.

And my only question is; why hasn't Lara Croft already been there to raid it?