A while ago I picked up an LPCXpresso board (specifically the LPC11U14 one), because it was going cheap on end-of-life runout sale, and it has USB built-in. I have a bad habit of buying more dev boards than I get around to ever using, so I was determined to actually use this one.
I decided to build some “multimedia keys” for my PC. The essential idea is to replicate the on-screen controls of a standard music player: volume, play/pause, next track, previous track, mute. My keyboard already has these, but they’re horrible touch-sensitive spots with no tactile feedback, and I always hit the wrong button (usually hitting the one that turns off the keyboard’s illumination, which leaves me wildly poking around blind until I turn it back on).
Another, slightly more uncommon, feature I wanted was a display of the current volume level. I figured an LED bargraph would be a good way to do this. I don’t need the precision of a number (32% volume vs 31% … who cares), so a bargraph with 5-10 increments would be the perfect tool for the job.
OK, requirements are (loosely) defined, how to program this thing? The board has a programmer built-in (it uses another, vastly more powerful LPC chip), so it’s just a matter of downloading the IDE (Eclipse-based), some example code, and finding a couple of mini-USB cables (hey NXP, use micro-USB on the next revision please!).
There are a couple of USB HID examples – a mouse, a keyboard, and a “composite” device comprised of a mouse and virtual serial port. I decide that the virtual serial port would be nice for debugging… because I have no wires to use for testing within arms reach. That’s right, I write a very basic interactive shell rather than look for a wire and soldering iron. Getting the virtual serial port working is actually not quite as dumb as it sounds, because it lets me spew out diagnostic data too.
I figured it would be easy to take the “composite” project, cut out the mouse parts, and paste in the keyboard parts. Unfortunately it wasn’t, mainly because I didn’t know jack about USB descriptors, but I got there in the end.
Some experiments with trying to get the chip to send an absolute volume signal (e.g. “hey computer, you got to 50% now”) were ultimately abandoned. For one, it would create race conditions between the setting on my USB device, and the setting on the PC (imagine the knob on the device is at 50%, user changes PC to 30%, now turns the volume knob down a bit… volume changes to 49%?). For two, I couldn’t bloody figure out how to make it work. At length I eventually added a linear analog control to the HID descriptor, but then gave up on the PC driver side (the multimedia keys work with the default OS drivers).
I also fought with HID descriptors for a while over adding the volume indication. I thought the “proper” way to do it would be to add an analog indicator (*check USB terminology*) to my descriptor, and get the driver to periodically send the system’s current volume reading…
But, well, I already had the virtual serial port working, and didn’t have a driver. So I just deleted the interactive debug shell and make the serial port accept 1 byte at a time, driving a bar graph appropriately (255 = full bar graph, 0 = empty). A convoluted bash command later, and the bar graph now correlates with my system volume:
pc = sys.stdin.readline()
pc = int(pc)
pc = min(100,max(0,pc))
It seems sad, looking back, that what can be described in a few paragraphs took me so many hours, but such is the price of sharpening rusty skills. I did have a steep learning curve – new chip, new IDE, never coded USB before, didn’t know jack about USB HID. Now I can at least say I have “experience” in these areas.
use a rotary encoder instead of buttons for up/down
design a stand-alone PCB & case
I’ll try to come back later with some source code. If you’re reading this, I obviously haven’t – drop me a message!
Let’s get right to the point – Sharktopus is a pretty terrible movie. But that’s kinda the whole point (at least, I hope it was intended). It’s the kind of movie you watch with a group of friends, laughing and mocking how bad it is. My friends and I actually watched for a while with no sound, and didn’t miss a single piece of plot, and even managed to correctly predict some dialogue (“Oh. My. God.”)
On the topic of plot – there’s not much of it, and what there is barely makes sense, but if for some reason you want to watch it for the plot, stop reading now. Vast oceans of spoilers ahead.
Obviously, there’s a shark/octopus hybrid monster. It’s named “S-11”, genetically engineered by a military contractor, and it’s gone on a killing spree because the electronic remote control was only attached with sticky tape. So, the super rich mad scientist guy sends his daughter and a bunch of lackeys out to chase it, while he swills cognac and gets angry on his luxury superyacht. Oh, and by the way, the monster has hyper-agression DNA, which is obvious to everyone except the daughter, who thinks dear old Dad wouldn’t fiddle with the genetic blueprint she designed (he eventually reveals that he did, but only after half of the hunting team is slain). You can probably already predict how it ends.
If the monster-chase plot isn’t enough to keep you enthralled, there’s some side plots with the minor characters. Our favourite was the sexual innuendo between Santos and Andy (never did figure out if it was deliberately homosexual or a failed attempt to make Andy seem like a ladies man). The hack TV journalist covering the story is as annoying as they normally are, and the sleazy radio presenter is killed by pure hubris, his final words “There is no such thing as a sharktopus.”
Technically, the cinematography seems to be directed by a teenage boy, with half the shots beginning close-up on a woman’s breasts or butt. The CGI is what you’d expect, it’s obviously nowhere near the same standard as a hollywood blockbuster, the sharktopus is obviously CGI but it’s not completely terrible (until the explosion, that was terrible).
Overall, I wouldn’t waste any time in seeking out Sharktopus, but if you’ve got a group of friends in the mood to half-watch a bad movie, it fits the bill.
“I don’t know why, but I had to start it somewhere, so it started there”
Common People, Pulp
Some weeks ago, the topic of hiking & camping came up in a conversation with some of my girlfriend’s friends. This being about the first time I’d met them, and them never having been on an overnight hike, of course the most logical course of action was to suggest that we organise one for the near future. Facebook friend requests were sent, an event was created, and then… nothing.
December is a busy time of year for everyone with Xmas parties, visiting family, new year’s parties, and general not feeling like doing anything resembling work. Hence, nothing actually got organised, until I got a facebook message “so, what’s happening?”. I’d made the event entirely non-specific, hoping someone else might have an idea of somewhere to go. Why I thought hiking newbies would know hiking tracks, upon reflection, is a mystery.
My first nomination for a destination, a perennial favourite among my usual hiking friends group, was a spot called “The Castle”. It’s a long drive from anywhere, the trek in is entirely uphill, with a river to ford, heavy growth to push through, narrow gaps to squeeze between, and there’s some exposed climbing thrown in for good measure. The reward is a campsite perched on a clifftop with the best views you’ve ever seen.
My request for ideas from the new group (a thinly veiled attempt to garner participant buy-in and/or deflect blame in case things went wrong) yielded but one response – “Wollemi National Park”. Being approximately the same size as the nation of Trinidad and Tobago, the lack of specificity didn’t thrill me, but it did prompt a vague memory of a previous hike to a spot called “Colo Meroo”, a well-equipped campsite with a pleasant location next to a river. The officially-sanctioned hiking trail in to Colo Meroo is variously described as between 9 and 12 km long, and of moderate difficulty, with some scrambling near the end.
A group vote between the two alternatives awarded a landslide victory to Colo Meroo.
In good spirits, we start off down the fire trail, which is gently heading down hill. As this will be our return trail as well, there is some mention of the fact we have to walk back up the hill, but no one is much concerned. No complaints about uncomfortable or overly-heavy packs, good times! The track notes I have are at best considered “adequate”, and in the absence of any way of measuring distance, I can only make wild speculation about how far we have to go, but again, no one is complaining much so no big deal.
As the track progresses, it narrows, but a fallen branch in a shady almost-clearing provides a decent stopping point for lunch, where Fran tells us about hiking in the German alps. We learn that there are apparently cattle roaming the mountains, which can be easily coerced into providing fresh milk. This blows our minds, as does the description of a network of huts where you can sleep, with luxuries such as electricity.
Back on the track, we undulate up and down, and the path gets much narrower (brushing through shrubbery) and far less distinct. Several wrong choices are made at forks, sometimes the group deliberately goes two different ways to assess which is the true path. A lookout spot offers views of the sandy river far below, which some believe to be stagnant (I think it’s just dark from decaying leaves). Following the notes’ advice to stick to the narrow ridge line generally keeps us moving forward, but concerns are voiced about the validity of our path. My recollections that “some bits look familiar”, and assurances that “we can’t possibly miss the river”, don’t seem to be hugely convincing, but we do eventually get to a steep downhill scramble, as described in the notes, where the path is much more obvious.
After completing the treacherous downhill scramble, the path gets easier and I know the camp site is not far away. At a Y-intersection, we pass a track marker post – it’s of some concern that it points up the branch that we didn’t come from, but I decide there’s no gain in emphasising that to the others. We reach a wide, flat, grassy track complete with “Colo Meroo campsite” signage, stopping briefly to shake the ants from our pants (I mean this quite literally).
At camp, we get started on pitching tents, cooling off in the shallow river, and talking to Ron, an older (topless) man who I firmly believe would talk underwater. He was friendly though, and had some interesting stories to share as well as information about other undocumented trails in the area. Other groups soon arrive: ~5 guys doing a 2-day float down river on air mattresses (aka liloing), and a meetup group of 11 who hiked in the same way we did. Some of them were quite social, coming over to share our (Ron’s) fire, but it would have been nice if that one guy was wearing more than just underpants.
Another unwanted display of body parts occurrs later that night when, while reviewing photos on [name redacted]‘s camera, going back into the camera’s memory reveals a genital close-up. The other witness and I burst into laughter, the unwitting exposee (repeatedly) expresses their belief that the photos had been deleted, but they aren’t too drastically upset (as evidenced by re-mentioning the incident on frequent occasions). The other members of our party, and the other groups at the camp site, (un?)fortunately don’t see the screen, and the picture is promptly deleted – from the camera, if not our minds.
The day begins with the inauspicious start of losing a party member (I wish I could say it was the first time it’s happened to me, but that’s a story for another time). Fran has decided that the uphill scramble is beyond her, and the alternate route being taken by the meetup group is much more feasible. They’re taking a much shorter and flatter shortcut through some private properties, and have a spare car seat to get her back to Sydney. We bid her farewell as she left with the group of 11 probably-not-serial-killers.
Talking with the “floaters” had revealed stories of deeper water, as well as rapids upstream, which sounded a lot more fun than the rather shallow and boring section of river near the campsite, so our rough plan for the day is to head upstream and see if we could find them without exerting ourselves too much. We set off at a leisurely time somewhere around 10am, cameras in tow, trudging up the river.
There are a couple of bad things about walking up the Colo River on a hot day – it’s hard work walking through quicksand against the current, and dry sand sections feel like walking on hot coals. The good thing is that when you get too hot, you can just collapse into the river to cool down, so we did.
After about an hour, we came to a nice wide, deep section, with a barely-perceptible current, and some rocks and fallen trees to climb on. Everything was covered in a horrible sludge, and there were some weird insects swarming over the log, but no matter, the sludge would wash off and the insects somehow disappeared when the log flexed and submerged their gathering site.
Much frolicking about in the water was done, photos were posed for, action shots were enacted. One member of our party decided to continue further upstream, which would prove a minor inconvenience when we got hungry and had to summon them back before we could return to lunch, but a good time was had by all. A group of Lilo-ers passed by, or I suppose it would be more accurate to call them “truck inner tubes and inflatable boats for packs”-ers (but that’s rather harder to say).
Returning to camp (with a couple more photo ops en route) for lunch we pass the tube gang again as they take a mid-river break. After eating I try to teach our group a card game – Durak – which despite playing frequently is always a struggle for me to teach. The incredible heat within the oven-like steel shelter doesn’t help matters, but eventually enough players get a sense of the game that I’m not explaining what to do at every turn.
Being hot, we variously nap in the shade, read books on electronic devices, or return to the river. The tube gang stops at the shelter for a while to eat, then moves out. Some of our nappers don’t even notice. Another lilo group arrives, but prefers to keep their distance, remaining on the “beach” for dinner. The ambassador they send to parley seems nice enough and chats to us for a while about their (mis)adventures. Later on they will set camp at the opposite end of the camp site to us – I don’t think they ever entered the shelter.
To pass the time, I decide to prepare a fire for later that night, collecting some firewood and arranging it along with some cardboard and kindling what I think is a good design. Some of the others of course disagree with my design, and re-arrange a few things such that they are pleased. I remove some of their additions so as to prolong the lifespan of the wood stockpile, and notice that my cardboard is already smouldering due to residual heat from the morning. I take this as a sign from the fire gods that we should light it now, rather than after dinner as I had intended, and only manage to burn a few of my fingers in the process.
After dinner we play a few more rounds of torchlit Durak, interspersed with some dimly lit photography attempts. Considering the lack of tripods, the model’s reluctance, and that the only lighting equipment on hand is a couple of LED torches with horrible white-balance, a couple of good results turn out.
Later, by the fire, not-very-successfully playing a collaborative storytelling game, we hear strange noises. As we joke that we should investigate by splitting up “to cover more ground” (as per so many deceased horror movie characters), the sounds get progressively louder and stranger. When it sounds like someone is tearing grass about 10m away, we flick our torches on and are surprised to reveal a wombat. This is my personal highlight of the trip, as I had never previously seen a wombat in its natural habitat. Amazingly it doesn’t care about our rowdy ramblings, merely giving us an uninterested glance when we are especially raucous.
Given the intense heat of the previous days, we plan to get up at 5am and aim to be on the trail by 6… The plan was overly optimistic and despite best efforts we don’t actually get moving until just after 7. Still, with a predicted 5 hours walk, we are hopeful of avoiding the worst of the heat – especially during the difficult upwards scramble at the start of our day.
Departing camp (this time following the sign-man’s suggestion of an alternate branch), the trail looks familiar to me – somehow on my previous visit we must have followed the correct path. There are not many signs to guide us though, so at times we are still guessing the path, but we make it up the very steep ascent in short order, and stop at a rocky outcrop for some album-cover-worthy photos as we stare into the distance.
Once atop the ridge, where the track levels out, the other couple in the group break out into song. Actually, pretty much every song that they can (half) remember from the musicals Les Miserables and Wicked. My girlfriend (walking in front of them) is not amused, but the other hiker and I (behind, where the volume is lower) find it amusing – especially the adorable voice breaks on some higher notes. Their repertoire (or is it their energy?) is exhausted, however, once we cross the saddle and begin the long uphill slog which had presented as an easy downhill stroll on the hike in.
Logging our progress on my GPS watch, I am hopeful that the National Parks “9km” sign is accurate, alas as the counter ticks ever higher it becomes obvious that my track notes claiming “12km” were more likely. Spirits dropping, the group stratifies out somewhat, as we trudge ever-upwards in silence. Somewhere around kilometre 11 the uphill gives way to downhill and we feel that the end is getting closer.
Once the locked gate is spotted at about 11.5km, we know that the end is only a few minutes away, and upon reaching the cars everyone instantly drops their packs. I pour my remaining water over my head to cool down, and someone suggests a victory photo, which we duly take, posing near the track head sign in varying degrees of exhaustion. We’d made it!
We grab an apple pie to take away as we pass through the nearby town of Bilpin, then stop for lunch a little further on at the Kurrajong Heights Hotel, partaking of some (overpriced) local ciders and hearty lunches. A group hug to say goodbye, and we drive our separate ways home.
For a group of first-time overnight hikers, Colo Meroo at the peak of summer is a fairly harsh introduction. Losing the path can be concerning at times, and in oppressive heat the hard uphill scramble really saps your energy, right before you have to walk another 10km uphill. Thankfully the camp site has great facilities, and the river comes in very handy for both drinking and recreation. Overall the group seemed to have a good time, and I thoroughly enjoyed the trip (being more experienced in hiking and perhaps more fit than some no doubt helped here). I’m hopeful that in a couple of weeks time everyone will remember the good times more than the bad, and we can start planning the next mission… Maybe somewhere a bit flatter.