Tag Archives: milton

Vacation Photos and RGB Sensors

So I’m back from a week travelling across the western half of Canada with the lovely and talented Mrs. Zheng3 and her parents. We now return you to your regular schedule of intermittent blog posts.

The trip began in Vancouver where I enjoyed the singular pleasure of spending a couple of hours meeting with the Pinshape team at their mothership. We discussed some of the more pressing questions facing 3D printing designers today, including but not limited to where one might obtain the best dim sum in BC’s fairest city.

Great bunch of folks, these Pinshapers. Sharp as tacks and friendly to boot. Take a look at their site and you’ll find a nicely-curated selection of models.

Robber Rex (a favorite at Pinshape) managed to visit the Vancouver Public Library, which has been cunningly constructed to resemble the Roman Colosseum.

vpl

hashtagRAWR.

The Saskatoon train station is as bleak an outpost as you’ll find, but still a welcome diversion for a constipated Parasaurolophus who never quite got the hang of pooping in a cramped train toilet.

saskatoon

The long train ride from Vancouver to Winnipeg, made longer by frequent sidesteppings to allow freight trains to pass, allows for much contemplation and idea generation and idle sketching upon napkins, and by the time I returned home I was more than ready to jump into the next project: RGB color sensing with Arduino.

There are, presumably, roll-your-own RGB sensors cobbled from disposable contact lenses, photoresistors, and Oreo cream, but at some point one must accept that expedience takes priority over molecular-level knowledge of a process and you just can’t be mining your own beryllium all the time. So to Adafruit we go, and earlier this week a TCS34725 RGB color sensor arrived on the doorstep of Zheng Labs.

milton inspecting

The Adafruit tutorial is remarkably easy to follow and we were up and running in less time than it took to print George Timmermans’ handy Arduino and half-sized breadboard caddy, including the time required to solder the sensor to some headers with long-unused and filthy soldering iron tips.

I’d link to the caddy directly except that WordPress is throwing some weird Unicode error and it’s too early in the morning to troubleshoot HTML errors. It’s on Thingiverse.

This little board contains a white LED that burns with the intensity of a thousand suns, so you may want to wire it to ground and turn it off while you’re experimentin’ or you’ll be seeing afterimages of your workspace for hours.

caddy

The book in the background is fellow Wisconsinite Jordan Ellenberg’s How Not To Be Wrong, which, 50 pages in, is so far a fun read. Any book that starts off with a humorous telling of statistical analysis of bullet holes in WWII airplane fuselages is going to be good.

Our engineering team ran into a little bit of trouble trying to get Unity3D to talk to the Arduino and settled for a temporary solution using Python code direcly cannibalized from 2012’s Etchasketchulator project:

import serial

ser = serial.Serial('/dev/tty.usbserial-A700fjTr', 9600)

def wait_for_arduino():

     while (true):      
          valueIn=ser.read(50) #read the first 50 characters that the arduino is sending
          print (valueIn)

wait_for_arduino()

That /dev/tty.usbserial-A700fjTr serial address is the currently free USB port on my MBP: if you’re using a PC you’ll likely replace that string with something that looks more like COM4. Check your Arduino IDE to see which port to use.

serial screenshot

Looks like I need to make the serial communication a little more elegant; it’s timing out, throwing errors, is badly formatted, and generally a mess. But let us not let the perfect be the enemy of the good. Iterate now, fix later.

ball pit

I used a couple of ball pit balls as test objects. In the interest of presenting properly-formatted data let’s go direct to the Arduino serial monitor for the output:

Offscreen I’m waving a red ball over the sensor and, wonder of wonders, the red values change over time.

arduino serial

Next step: communicating with a passel of these RGB sensors. This should be a challenge, since each one has an identical address and as far as I know they can’t be changed in hardware. Getting ready to hop on the I2C bus.

I’ll clean up the serial communication by next time, promise. And calibration. Gotta do some pre-read calibration of the sensors for ambient light levels, too.

Note to self: buy new soldering iron tips before we go down this road. #staytuned.

The Forge 2.0

Too long has it been since the last post here at the blog. Well, there was yesterday’s short fiction about Milton, but that was just an amuse-bouche while I got the last of the unruly ducks in a row on The Next Thing.

So! The Next Thing.

After digging into forgotten tomes of PHP lore and dusting off my HTML and CSS (it’s amazing what one can do with CSS and HTML 5 these days) and taking my first tentative steps into SQL (ye Gods, people make a living programming this? poor bastards), and hacking away at .htaccess goblins and DNS bugbears I’m thrilled to announce The Forge, version 2.0.

It’s still located at forge.zheng3.com. Any links you might have to individual pages in Forge 1.0 will still work, but won’t be updated anymore. It’ll take me a few days to get the redirects up and running.

Milton the Parasaurolophus is the Forge’s inaugural model. He’s a kinda-sequel to Robber Rex and Pip’s Print-in-Place Perambulator. The Island of Catan at Zheng Labs grows ever more thick with low-poly dinosaurs.

Some of the lamer models (cough)shaolinspadewacomnib have been culled from The Forge, and the upload process is much, much more straighforward on my end. My goal’s to reduce the time and fuss required to get a model file from my desk to yours. I’m not 100% thrilled with the way the Forge displays on mobile yet, but it’s functional enough and honestly, there’s only so many hours in the day to attend to every little detail.

I’ll put a B-team of kobolds on it, and maybe it’ll get done someday.

All this Forge work has slowed the production of new 3D models, but the ideas have been piling up in the hopper over the last six weeks. I’ll try and get to them ASAP and we’ll see just how powerful this fully armed and operational 3d model sharing site really is.

As always, #staytuned, friends.

Pathos in Paradise

milton

(You can download Milton here.)

Milton shifted uncomfortably among the ferns, moving his weight from one haunch to the other. Pooping in an unfamiliar spot was always stressful, and the noise from the playground tightened him up even worse than usual. His hams were prickly from the heat and pins and needles brought about by a long squat. I really should be doing more yoga, he thought.

But going to class meant that other herbivores would see how inflexible and fat he was, and Milton always felt he was the poster child for Doing It Wrong. Maybe he could just stream yoga videos on his iPad and practice alone at home.

He pushed a little. Nothing. Pushed again. He could feel the first pellet six inches from freedom, stone-hard, stuck, and blocking its comrades from exit. Dehydration, probably, or possibly too many gingko nuts. If he could just get this plug out the rest would come easy, he was sure of it.

Fixing his brow, he pushed too hard, and strained a suprised warble from his crest by accident. Oh, God, if the children heard the sound they’d be on him in seconds.

Some of the other Parasaurolophus on the island loved the humans, but Milton preferred solitude, especially while pooping. The Settler children always begged him to toot little songs while they danced around him like a maypole. The children were cute, but Milton knew his songs weren’t any good and that was why none of the adults ever danced around Milton, the inflexible and fat maypole dinosaur.

Perhaps doing downward-facing dog would move things around enough to shake the pellet loose. He licked his beak and tried again. Mid-pose he contemplated his tail, which reminded him of the time he had knocked over the velvet ropes at the bank with it. Everyone looked at him (everyone was always looking at him) and then the ropes fell and made a tremendous crash, which only made everyone look at him some more.

The sound of crunching leaves told Milton that he was no longer alone. He looked up into the face of a little human, caked in slop and burrs. Milton couldn’t tell the males from females when they were this small, but he did notice the muddy turnip the creature held in one paw.

A turnip. Goodness! Eating a turnip might be just the thing to loosen up the sluices. He sniffed and clicked his beak hopefully. The child made a little warble of its own. “Toot!” it barked. “Toot!”

Milton reached forward and nipped at the turnip but the child pulled it out of reach and frowned. “Toot!”

Several other children had taken notice from across the schoolyard and started running towards him. The turnip bringer turned towards the approaching pack and shouted something in its chirpy stacatto language.

The child turned back to Milton, joined by a dozen similarly filthy companions. It beckoned towards the dinosaur, waving the turnip under Milton’s nose. It whispered slyly as its cold blue eyes met Milton’s gaze. “Toot.”

The ring of children began to chant. “Toot! Toot! Toot! Toot!”

Very well, thought Milton, a performance, then.

He inhaled deeply, expanding his ribcage as far as he could. The children fairly rippled with excitement as Milton’s mighty diaphraghm flexed in preparation for an epic bellow.

A chill suddenly swept over Milton’s body. Every scale from crest to shoulders seemed to prick up on its own, and, with a sickening slurch, something terrible shifted inside his gut.

Oh no. It was coming. Milton turned to run, but was blocked on every side by the tiny humans. He had no desire to trample the little brown creatures but perhaps if he could just nudge one of th–

A grapefruit-sized mass of moist fiber shot from between Milton’s legs and struck one of the children in the neck. The child collapsed, shocked, and Milton thought he saw a fragment of gingko nut stuck to the child’s lip. The other children burst into raucous laughter.

Milton whirled to apologize and the rest came forth in a torrent. Smaller lumps splattered the turnip bearer with chunky filth. A green liquid ribbon arced and danced as Milton turned, dousing a semicircle of children. The laughter turned to shrieks as the little humans fled, slipping and stumbling in the pool of waste. The turnip, long rendered inedible without a good washing, was mashed into a broken patty by panicked feet.

I’m sorry, Milton thought. So sorry. Forgive me. His knees trembled as the last trickles left his body and dripped onto the leaves below. With the children now silent, the pitter-plops were the only sounds left in the world.

The dinosaur turned and slunk away towards his swamp, keenly aware of the angry mob’s hot glare from the relative cleanliness of the schoolyard pond.