Sleeping In at Dragon Burn

Camping in Anji (安吉县) at the regional Burning Man


So that happened. A surprise opportunity to see what the Chinese interpretation of Burning Man would look like, for less than 100USD, tent & bus ticket included. Duh.

My friend had basically been camping at Xin Che Jian anyway, and he jumped at the opportunity to take the early bus out to volunteer and set up, which I’m a little jealous of, cause he got to build stuff. I woke up early the next day to make my way downtown to catch a bus. Unfortunately, I was feeling groggy when I descended to the subway platform during morning rush hour, and saw people stuffing themselves like sardines onto the southbound train and I thought to myself “Whoa. Good thing I don’t have to get on that train.” and took the path of least resistance onto the nearly empty northbound train. I took me 2 stops to realize I was going away from downtown when I had the opportunity to transfer to another equally stuffed train. I didn’t see how I would squeeze my full pack of luggage on and calculated that I probably wouldn’t make it in time anyway. The end of the line was called “Meilan Lake” and I thought that sounded nice so I just stayed on the roomy, quiet, wrong train.

Luckily I looked at a map (for once) to see that there wasn’t actually a lake anywhere near the Meilan Lake stop and got off at one of the University stops instead. I wandered around campus, trying to enjoy the streams and the sun and hoping I would run into something interesting, but ended up just heading back to Xin Che Jian after a half hour. The whole time I had a backup plan, of course: there would be a 7pm bus, and I had the feeling they would honor my bus ticket regardless.

Woman in native American headdress in Shanghai, telling people “Get the fuck on the bus” at once playfully and sternly. Chinese twenty-something in what I called “that hat people wear in rice fields” and she called “yeah, an asian hat.” carrying 40L of water. Sycamore trees in the French Concession.

Later in the afternoon, after killing time installing a different linux on my laptop (hooray! everything works on debian right away! ❤ debian) I decided to walk the mile and a half to the bus pickup spot, strangely enough an Australian sports bar. I later eavesdropped “there’s just not that many places in Shanghai to park a bus.”

So I meet my fellow burners. I shouldn’t have been too surprised but it was about 80% expats. People working in Shanghai from Copenhagen, Ireland, Canada, U.K. and so on. We shared some food, stood around while the luggage was loaded onto the buses. The ticket-taker couldn’t find my name on the list (since I bought a ticket for a different time) so she made me pinky-swear that I didn’t counterfeit my ticket and let me on the bus.

I picked a seat to myself, only now remembering that I have a hard time starting a conversation with someone without already having a reason.

I hadn’t slept much, and having just walked 2 miles with 30 pounds of stuff, I submitted to my exhaustion and closed my eyes for the first half hour of being on the bus. I tried to nap, ignoring the noise and the music of a bus on its way to a party in the forest, but eventually I opened my eyes to see the Chinese billboards and illuminated LED skyscrapers and was struck by the improbability and novelty of my rolling through Shanghai to the soundtrack of 1970s American Funk being played on a portable loudspeaker.

I decided that maybe it was a good thing I wasn’t talking to anyone, I could focus on the strange scenery out the window — the sprawling city and far off, inexplicable bright lights. At one point there was what looked like a half of a donut sticking out of the ground on the horizon, lit up like a televsion. I still have no idea what it was. Maybe it was just a giant, donut-shaped televison, maybe they have those here.

Eventually, though, the Canadian girl sitting by herself behind me tapped my shoulder, asking if I was travelling alone, and I traded in my excess legroom for a conversation partner. I told her about my work at FabLab and she told me about how she got a teaching job in Tripoli right out of college, owing to her double degree in History and Psychology. She says the job market wasn’t looking good for people who could only teach one thing, so she buckled down and double majored. She taught in Libya during a relatively peaceful period a year ago, but was evacuated soon after she started hearing gunshots at night aimed at her apartment bloc. Luckily, her contract was up soon anyway and she lined up a teaching job at one of the international (a.k.a. private) schools in Shanghai. I asked her about the curriculum difference between public schools and private schools, how China’s role in WWII was represented differently and the kids in private school were taught from U.K. textbooks. I wondered what conversations about history looked like between kids who had different educations, but she wasn’t around for that.

So of course I knew this bus was full of interesting people to talk to, you don’t get on a bus from Shanghai to a Burning Man by sitting at home all day, but still I couldn’t help but keep to myself. I tell myself that I have enough ideas I haven’t done anything about, and meeting people will just fill my head with new ideas before I’m done with any old ones. I know that’s dumb, I’m just rationalizing my introversion.

Anyway, this happened:

Pulled over in the middle of nowhere.

“Why did we stop? Did we lose the other bus?”

A few minutes go by.

“Does anyone know how to get to the campground?”

“Oh nooo, we’re the lost bus.”

“While we’re at it, does anyone on board know how to fly a plane? And also know how to get to the campground?”


My ‘VIP’ tent on the left, the more communal tent city on the right. There was food getting cooked in the tent city. You live, you learn.

But we made it, rolling up to a forest glowing bright green at half past midnight. People lined up to check in, renting tents and accepting the garbage bags being handed to each person. I opted to pay the extra ten bucks to rent a tent that was already set up on a platform so I could get right to dancing. That ended up being just a so-so decision, tho, since these ‘VIP’ tents were on a different part of the campground than everyone else. Not only was it removed from the easy community that comes with having a dozen people living a couple meters away from you, it was a lot closer to the main stage and the loudspeakers, which is pretty VIP until you want to sleep. In the morning when I was looking for a water kettle to cook my cup of noodles, I saw campers gathered in the walkways with propane hot plates and lots of finger food and again kicked myself for paying extra to stay at the top of the hill. I suppose I could have joined them, but I didn’t think I had much to offer and in general feel like I’m being rude if I insert myself into someone else’s situation.

Before I found out that I was going to be an introvert for the whole weekend, though, I did dance my butt off til 4am. I started recording the music just after that before crawling into my tent, too bad the recorder died after 7 minutes, the music played until noon. That was the most surreal part of the whole thing, waking up to gray light and looking out my tent to see a foggy forest at what I guessed was about 7am with like 8 people still dancing. Actually being able to lounge in my tent and watch the dance field was pretty cool, though.

I went back to bed, no longer phased by nonstop bass arpeggios. Actually I think it had an airplane-jet-engine-drone effect on me, where just the constant loudness lulls me to sleep. I’m pretty sure I woke up the second time when the music stopped, out of a confused “something’s different, what’s going on” kind of reaction to the quiet.

With the sun back in the sky, a few people stretching turned into an impromptu yoga class as people woke up and copied what the especially-stretchy guy was doing. We would follow him from one stretch to another, everyone laughing at themselves for not getting half as far into the stretch as our accidental class-leader.

More buses of people showed up, bringing the campground total to somewhere between 100–150 burners. People made art, offered their juggling clubs to people who wanted to try, and talked to each other during the quiet afternoon before the next DJ was scheduled. There was an awful lot of smoke circles that I didn’t want to participate in, so I felt put off from making friends, though in retrospect there were enough people sitting out that it wasn’t a good reason to keep to myself. I think what’s really happening with me is that I feel bad about not maintaining my existing relationships better, I know I leave people hanging a lot, maybe say ‘see you soon’ and never make plans. I imagine I’m doing a disservice to someone to introduce myself and make new friends knowing I won’t answer their messages either. It takes energy to reach out to people, and maybe I’m greedy with whatever energy I have, taking it for myself. I’m still trying to figure out how much I want to change that.

When I did want to socialize, though, there was a really great sunlit cabin beside the tent city and the dance field. The elongated honeycomb framing the windows overlooking the lake was really beautiful. The table was a giant slab of a single tree, 20 feet long and 4 feet wide, mounted on sawed off tree trunks. Really nice place to sit and boil water and chat. The regional’s organizer told stories of Burning Man back in the 90s, before they had rules about firearms, for instance. His old photos from the playa were strewn about the table, along with his choice comic books and various revolutionary propaganda. I borrowed a copy of Debord’s Society of the Spectacle and fell asleep in a hammock.


The next morning I noticed a ‘Moka Pot Coffee Workshop (free coffee)’ on the schedule and made sure to be back at the cabin at 10am sharp. Had a really pleasant time sitting with people from all over the world exchanging coffee rituals. The Italian running the ‘workshop’ showed us how his grandmother whipped sugar and a drop of coffee into a foam. We struggled to find cups and found out PET has a pretty low melting point. I figured out I have a much better time with people who are waking up on stimulants than people passing around narcotics.

That’s about all I have to report. It was loud, I slept a lot, the mountains are really pretty, I actually don’t have a lot of fun at parties. Had a great conversation concerning how you learn a lot about yourself when travelling just because you’re always putting yourself in new situations, and you get to see how you react to it. I react to lots of things by sleeping.







High Quality Gifs with FFMPEG

After getting FFMPEG installed, let’s try it out on a MOV downloaded from my google photos account:

ffmpeg -i MVI_6654.MOV firsttry.gif

We’re calling the ffmpeg program and telling it that MVI_6654.MOV is our input file with the -i flag. the filename at the end defines the conversion and creates the new file, resulting in:


Pretty cool. But I bet I can make it loop nicely by just using the first few seconds, so we use the duration flag, -t and specify the duration in seconds.

ffmpeg -t 2 -i MVI_6654.MOV secondtry.gif


So it loops! kinda slow tho, maybe we can drop every other frame? A-ha. Thanks to the -r flag, we can choose a frame rate for the output (note that these options do different things based on their order. -t is used before the -i input, -r is used after the input, so it affects the output.)

ffmpeg -t 2 -i MVI_6654.MOV -r “15” thirdtry.gif


That’s more like it. As an added benefit, the file is now 2 megabytes instead of 8 megabytes. I’ve got another one to convert that has kind of a long input video, so I’m going to specify a time to start the gif as well as the duration. The -ss flag defines the starting point. Oh yeah, and your seconds can be decimals. If you have a longer video and want to define the starting position in hours, minutes, seconds, you can use “hh:mm:ss” format, like “00:00:03” instead of “3”

ffmpeg -t 3 -ss 0.5 -i MVI_6663.MOV -r “15” fourthtry.gif


This has been pretty simple, but I know I’ve seen better looking gifs. Let’s find out how to make it look more like a video…

Learned a lot from this blog about the color palette algorithms.

Found a relatively simple example on stackoverflow.

We have to generate a custom color palette so we don’t waste space storing colors we don’t use (the gif file format is limited to 256 colors):

ffmpeg -ss 2.6 -t 1.3 -i MVI_7035.MOV -vf  fps=15,scale=320:-1:flags=lanczos,palettegen palette.png

You should recognize what -ss, -t, and -i do here, -vf is a way to invoke filters on our video. so we can describe fps and scale here. Hm. I’ll admit I don’t know what -1 does. But the flags describe what algorithm to use, more info in that blog. So that generates palette.png which we can use in our 2nd line in terminal (by the way, the backslash at the end of the line is if you run out of space and need to keep typing, hit backslash and return and you can keep going on a new line before hitting return to complete the command.)

ffmpeg -ss 2.6 -t 1.3 -i MVI_7035.MOV -i palette.png 
-filter_complex “fps=15,scale=400:-1:flags=lanczos[x];[x][1:v]paletteuse” sixthtry.gif

This uses our .MOV as an input but has a second -i flag to use palette.png as a 2nd input. Then, ok, I copy pasted the rest of it, but I’m happy enough with what this produces that I’ll stop asking questions 😀

Let me know if there’s anything I can explain in more detail, but don’t ask me for help installing things, just google it!






Side by side comparison of easy, default color palettes and head-scratching custom color palettes

I’d like to revisit this with more general advice and showing off other aspects of ffmpeg, but in the meantime here’s articles that others’ found helpful.

https://rigor.com/blog/2015/12/optimizing-animated-gifs-with-html5-video

Simple Sound Triggers with Arduino

This tutorial will allow you to play short samples (less than four seconds) from an Arduino with no extra hardware. It is based off the work of MIT group “high-low tech” and uses all free software. It will futher explain how to trigger the sound using sensors. It is generously translated into Chinese by Chris Zhang at Shanghai hackerspace Xin Che Jian:

https://medium.com/p/5065ee3de7c8

The necessary software is available for MacOS, Linux, and Windows. Arduino IDE and Audacity will need to be installed. The original tutorial provides two more pieces of code:

An Arduino library for audio playback.

A Java program for converting the audio file. Windows. Mac. Linux.

You can either open an existing file with Audacity, or record a new one, which is what Chris did to create our ghost sound. Freesound.org is a great website to download other people’s recordings. Try it out! Use the record, stop, and play icons at the top left of the program.


When deciding what sound to use, we have to consider the very small memory of Arduino — 32kB for our program + our audio. Audacity has a “resample” ability so our sound takes up less memory. In the bottom left corner, change the project rate from 44000 to 8000. Then in the Tracks menu, select Resample, and hit OK.


When powering a speaker directly from the Arduino, it won’t be very loud. In Audacity, if your sound waves aren’t very tall (low volume, low amplitude), it’s useful to use the Normalize effect. This boosts your levels as high as possible without clipping (overpowering the speaker resulting in distorted sound). Select Effect →Normalize and set the amplitude to zero before hitting OK.

Next, click and drag a portion of your sound wave (less than 4 seconds in length) and select File →Export Selected.


In the Export menu, you’ll have the option to change the file format. This is typically the difference between mp3, wav, and flac, etc. but we’re using a more uncommon file type, so in that menu choose “Other uncompressed files” and click options. Choose WAV (microsoft) as your header , and Unsigned 8 bit PCM as the Encoding.

This results in a very small .wav file that we can finally convert to store on the Arduino. The conversion program is written in Processing so for now it requires Java. Run “EncodeAudio”, which simply asks you to select that wav file you just exported. The results are stored on your clipboard, waiting to be pasted. We’re ready to open Arduino and save the file to memory.

Open the Arduino IDE and add the PCM library downloaded above. Open File →Examples →PCM →playback. It should look like this:

https://gist.github.com/jazzyjackson/08a0f968f616e589ea8b

That long list of integers is the example sound, we can replace it with the list of integers that resulted from Encode Audio. Triple-click on any of the numbers to highlight the entire line (thousands of numbers long) and use ctrl-v or cmd-v to paste our own sound.

Upload this code and the sound will play on a speaker connected to pin 11 and GND. You can either use a tiny speaker like in the doorbell tutorial, or if you have speakers with a headphone jack, wire it up like so:


GND gets attached to the tip, pin 11 can be attached to either (or both!) of the remaining silver bands. Be sure to start with the volume on your speakers turned way down, this will play full blast! Also probably don’t do this to your nice stereo cause I’m not sure if it’s safe, I just know it works.

With the current code, the sound will play once when the Arduino turns on: you can hit the ‘reset’ button on the circuitboard to play it again.

The simplest trigger possible is touching two wires together to connect GND to a sensor pin. In our loop we constantly check if our sensor pin is ‘LOW’ and if it is, we start the sound. So cut the ‘startplayback’ function from inside the setup and paste it inside a conditional statement in the loop, using digitalRead() to check if it’s connected to ground. To make sure it doesn’t go off when no one is at the door, we use the internal pull up resistor using pinMode(). This is our final code for using a simple switch to trigger a single sound.

https://gist.github.com/jazzyjackson/28fa0aaac29a8b1ba432

Notice that I changed the name of the array from ‘sample’ to ‘ghost’ — be sure to change the name in the startPlayback function as well — it’s used twice.

You’re not limited to this, of course! You can have as many different sounds as will fit on memory (so 4 seconds total) but trigger them at different times. Copy-paste that ‘constant unsigned char sample[] PROGMEM’ code and give different names to different lists of numbers. You can also use an external pullup resistor of 1 megaohm (the built-in one is only 10k) to make it touch sensitive instead of having to touch two wires together. Connect the megaohm resistor between the sensor pin (A0) and 5V. Delete the pinMode function from the setup.

The following code uses booleans to play a different sound each time the sensor is touched. This one includes our ghost sounds, so you can upload this and try it yourself. Megaohm resistor between A0 and 5V, speaker on pin 11 and GND.

https://gist.github.com/jazzyjackson/f0dac125813235e8bfa5

Have fun!

The doorbell has a boring sound. We can fix it.

ATmega328 + JQ6500 MP3 tutorial


Fellow Xin Che Jian member LuFeng came in with a good project and a stack of microchips: Microduino modules that can be programmed to play music off a memory card and a wireless doorbell that made a boring old doorbell sound. He’s new to arduino and the tutorials for these modules are fairly vague, so I thought this would be a good opportunity to write up a tutorial on using an Atmega328 and a JQ6500 to trigger sounds with a really simple program.

From left to right: UART serial programmer, ATMEGA328P, JQ6500 MP3 module, microSD module, and 2 channel amplifier

Here’s the tools we had, a really neat set of stackable modules called Microduino programmable with the standard Arduino IDE (though you might not know that by reading their website — for this ATmega328 at 5V and 16Mhz clock, you can tell the IDE that it’s an UNO, no extra hardware files are requried.)

While I used these modules to get this project to work, if you get these parts in a different format (maybe an Arduino UNO and a JQ6500 on a breakout board) the following instructions should be relevant to you, too.


So we’ll deal with two stacks separately first: the audio module with the usb port stacked on top of the memory card module and the ATmega328 stacked on the UART.

When you plug in the audio + memory card stack, two drives will show up on your PC: one is the internal storage on the MP3 decoder, you probably don’t want to touch that one. But the drive that shows up called “SD” is where we can drop our MP3s. Microduino’s wiki has some information on the necessary naming scheme: Our file will be called “001.mp3” and be placed in a folder simply named “01”


Audacity makes it easy to grab a short clip of our chosen sound: a nice piano arpeggio from a longer song. If you’ve never used Audacity, no problem, you can visit their website for a Mac or Windows executable, or if you’re on debian (ubuntu / kubuntu / mint etc) you can just open a shell and type “sudo apt-get install audacity” and it will magically be installed on your OS. File → Open your song, click and drag across its sound wave to select a portion of it, and hit play to listen to your selection. Once you’ve selected the few seconds you want to play, you can hit File → Export Selected Audio and choose your file type as MP3, save it with the filename ‘001.mp3’

With your mp3 moved to the ‘01’ directory of the SD card, we can unplug that module and start programming our ATmega328. The microduino wiki was really vague on how to write code to control the MP3 module, but thankfully it gives the model number of the IC it uses: JQ6500. So I searched for a “JQ6500 arduino library” and found something really well documented here. So download that library and add it to the arduino IDE in the usual way (Sketch →Import Library →Add Library… or unzipping into your sketchbook, whatever works for you.) Check out the example sketches, “Full Demo” and “HelloWorld”, but here’s my code to simply play the first file on bootup. (01/001.mp3)

https://gist.github.com/jazzyjackson/de8f905636a6a3a05fb5

The only part that may be different based on your hardware is line 5, the object declaration that defines what Arduino pins will communicate via software serial to the JQ6500 chip. Looking close on the underside of this particular breakout board, the default TX and RX serial pins (the ones not in parentheses) are labeled next to D2 and D3, which in Arduino IDE language corresponds simply to 2 and 3.


So I declared my object as mp3(2,3) but if you’re using a different breakout board for the JQ6500 you will have to determine which 2 pins are wired to JQ6500’s RX and TX and use those pin numbers in your “JQ6500_Serial mp3(tx, rx)” declaration. By the way, ‘mp3’ is a user definable name, it can be called whatever you want.

Once you’ve got that figured out, you can load the code to the little stack of UART + ATmega. Unplug it once it uploads, and join the two stacks together, and add the amplifier module on that, so you have a whole tower of modules. Oh, important thing to know at this point: if you try to power the stack via the audio module’s USB, it won’t work, it will try to boot into file transfer mode, so power it with the UART module or otherwise.


If everything has gone right so far, you can plug a little speaker (the aluminum 3W style pictured at the top is perfect and easy to get a hold of) into the amplifier and give it power you’ll hear your sample. Did it work for you? I hope so.

To get the sound to play only when our original doorbell rings, we have to add a conditional to our program: instead of just mp3.play() in the setup, we use an if statement in our loop so that the ATMega328 is constantly checking for an input, it’ll look something like this:

void loop(){
if(AnalogRead(A0) > 400){
mp3.play();
}
}

Our input will be the two wires that use to be the doorbell’s speaker. For this, I cut off the original speaker and soldered new wires into its place. One of these wires should just be grounded, and the other wire can be stuck into A0 for measuring.

To make a sound, the speaker is pushed and pulled by changes in voltage. ATmegas have a 10-bit analog-to-digital converter that is super useful for measuring changes in voltage. Instead of measuring if something is turned on or off (like a button, which is strictly on or off, digital, 1 or 0) the A0-A7 pins let you measure subtler changes like a speaker buzzing around in between high and low voltage (between 1 and 0 😉

The readAnalog function performs this measurement for us, and if you want to experiment with this you should try the File → Examples → Basics → AnalogReadSerial program, which lets you open the serial monitor and see what voltage the ATmega328 is measuring. When you have what-use-to-be-a-speaker wired to GND and A0, and watching your serial monitor when you ring the doorbell, you’ll see a number jump around and settle back to 0 once the doorbell stops ringing. So in the code snippet, our mp3 will be triggered whenever the voltage jumps above 0V. (the 400 is a number we pick. In arduino-land, zero volts reads as 0, and 5 volts reads as 1023. That’s just because the hardware on the chip has 10bit precision, which is to say, it can distinguish between 2¹⁰ different voltages. 2 to the tenth power equals 1024, and if you have 1024 numbers and want to start at 0, you get the range 0–1023. So any voltage it measures is returned as some number between 0 and 1023.)

However, this simple way of waiting for change in voltage is susceptible to a electronic hobbyist’s worse nightmare: noise. Even if things are wired correctly (but especially if they’re wired loosely) little spikes in charge from humans handling things or other more mysterious sources can cause a spike in measurement, thereby triggering our doorbell when no one is at the door.

A slightly more reliable way to wait for changes in voltage, then, is to use a handy feature of ATmegas called an ‘internal pullup resistor.’ This phrase didn’t make sense to me for a long time so I’ll elaborate a little: if there’s a signal that may naturally fluctuate and you want to prevent it from fluctuating, you can wire a resistor in between that signal and a power source (thereby “pulling the signal high”, making it a “pull up resistor”) or wire a resistor in between the signal and a ground source (thereby “pulling the signal down to ground” making it a “pull down resistor”). If I didn’t explain it well enough, search for more articles about it, it’s a super useful thing to understand.

ATmegas have one of these resistors built in inside the chip and it can be programmed to be connected to a power source or not (this is the magic of programmable computers…they are machines that re-wire themselves). It can keep the analogRead measurement pinned to 1023 until some other active component, like our speaker signal, interferes and pulls the voltage low (remember how the speaker gets voltage pushed and pulled? That’s why this can work by measuring from 0V or from 5V, we just want to wait for a change in voltage, doesn’t matter what direction.) So to set that internal pullup resistor and wait for a change away from 5V, our code will look like this:

https://gist.github.com/jazzyjackson/8996d6519b7cd0cbf965

Oh, and the pinMode(6, OUTPUT) and digitalWrite(6, LOW) is kind of silly, I’m giving myself an extra place on my tiny MicroDuino modules to ground the speaker. Arduino UNOs have 3 different places to GND things, but if you ever need more, you can set a pin low and it will work just the same as a GND pin. Just don’t ground something that uses lots of power, because this forces current to go through the chip.

But that’s the final program, and the final necessary wiring: old speaker pins plugged into GND and A0, JQ6500 connected to pins 2 and 3, and I’m using the 5V pin to power the doorbell. It use to be powered by 220V mains, but that part exploded for reasons I don’t need to go into detail about here. Did you ever see Wayne’s World? Fireworks. Suffice to say, this almost become a blog about how to build a replacement full wave rectifier out of diodes until it occurred to me that the parts that I want to use can be powered off 5V.

Now when the doorbell makes a sound, it triggers the arduino to command the JQ6500 to play its mp3 and we hear a nice piano arpeggio instead of a boring old simulation of a doorbell.

Shanghai Maker Carnival: A Poem of Optimism and Pessimism

All my cameras’ batteries died, so I drew a picture instead.

Really great 1930s era stadium built from stone filled with exhibitors’ tents surrounded by high-rises from every decade. Old tenements and new glass skyscrapers.

A booth where people assembled a kitted ukulele.

Mothers looking proud as their young sons soldered electronic kits.

Women my age exhibiting their hand dyed indigo fabrics and basket weaving skills, holding workshops to teach traditional crafts. People being just as enthusiastic to try basket weaving as LED blinking.

Superb LEGO sculptures.

A girl who was super stoked that I paid 20 yuan (~3USD) for their orange juice. (I was super confused, they were a coffee / juice bar, so all their bottled products said coffee/juice, and I was trying to ask if this coffee has juice in it, or does this juice have coffee in it)

Neat products. Super simple robot kits. A sweet dirt cheap LIDAR module for autonomous vehicles. Nixie tube clocks: a whole niche market fueled by soviet vacuum tubes.

Little kids operating tiny machining tools. A lathe just a foot long, a table saw that was 4 inches square. I can’t find the company that was representing there, but I found the product on alibaba. Parents were letting their kids cut and lathe and grind stuff with no safety gear and I was actually super concerned but nobody else was. Sam told a parent, ‘OK hope no one cuts their finger off’ and the dad just laughed. I’m like, ya’ll gotta tie your hair back what are you doing.

Lots of DIY laser cutters. Even little 2W lasers can blind you instantly why didn’t you build an enclosure you really should be wearing eye protection it’s not hard.

A long line of people waiting to step inside a giant safety net to pilot a quadcopter for a few minutes. A couple of quadcopters flying around outside this cage, videoing the event.

A young boy pointing up excitedly a the surveilling quadcopter in amazement. It occurs to me that if quadcopters eventually become omnipresent annoyances he might look back on the first time he saw one here.

Entrepreneurs getting to introduce hundreds of people to what their product can do. CNC machines, autonomous robots, and cute windmills all made from makerblock, pretty cool.

Entrepreneurs unable to attract a crowd to their demonstration of their variation on circuit lessons, puzzle games, or construction blocks. How they must have felt to have invested so much time to make a product and have everyone walk by to the crowded table neighboring theirs.

There’s a lot of people encouraged to make 10,000 of something to see if it will sell. So many ideas that only increase the demand for resource extraction for plastics, computer chips, and electricity.

But the air feels clean (pollution here, at least, is carried away by the breeze) and kids are building toy wind farms out of LEGOs.

Xin Che Jian in Shanghai

“New World Shopping Center”

Shanghai has always had a place in my imagination, from some mixture of movies and cartoons. “I think maybe because of Jackie Chan?” “Jackie Chan?! Jackie Chan is from Hong Kong!” “Yeah but some of his movies are in Shanghai probably, right?” So yeah I don’t know why, but I’ve always wanted to come here, and since the hacker-tour-group was moving onto Beijing the day after I arrived, I decided to stick it out with some new friends at Xin Che Jian.

It is an extremely active and welcoming community at Xin Che Jian: within hours of ■■■■■ getting in touch via IRC, we were let into the space and shown around. A couple hours after that, ■■■■■ got a commission to work on the space’s security features (name redacted due to maybe-his-visa-doesn’t-allow-commissions). So the members there are always looking for ways to improve the space and come up with new workshops: I hear they do workshops every weekend bringing in dozens of kids or adults— workshops every week is AMAZING for an ad-hoc organized community group.





They are tucked in a co-working space among design studios and probably tech-consulting firms (Wild guess, maybe I’ll ask next time I’m there). The kind of office where all the walls are made of glass and people seem to do business without a scrap of paper. There’s a nice hydroponics setup with a fat tilapia fish named Henry. There’s water-jugs converted to RGB LED lanterns hanging from the ceiling. Actually now that I look up at the ceiling I see all kinds of things hanging up: an RC helicopter, a model fighter plane, a bag of large sheets of styrofoam, and the wooden frame of an ultimaker 3D printer (lol). It reminds me of Makerspace Urbana, really, just big tables to spread out, and lots of boxes of old projects residing on shelves. Also you have to walk through a backalley to get in and you’re not sure if you’re in the right place until you see gears and LED strips.


Shanghai is an incredible place to have a hackerspace. Head east on Beijing road to the electronics markets: outdoor stalls in addition to a multi-story mall dedicated to selling electronics components. You can point to the one you want, haggle a price, head back to your hackerspace to see if it works, and come back and buy 1,000 of them if you want. My friend and I recalled all the times a project was slowed down to wait 2 weeks for a part (always faced with the dilemma, get it in 2 days, or get it cheap, I had the realization yesterday that all those parts I buy off eBay are available at the Chinese price, but I can get it today. Cause I’m in China. Mind blown.)










Linear rails, articulated arms, and motor couples, oh my!

Learning with Social-Emotional Robots


Orpheum Children’s Science Museum in Champaign-Urbana has a great resource upstairs: a closet packed full of LEGO mindstorms parts. Dozens of motors and sensors, a classroom set of Mindstorms CPUs and laptops to program them, and bins & bins full of parts.

When I started volunteering as an assistant, I was really pleased with the diversity of activities Greg Fabry stuffed into the robotics camp sessions: gum drop toothpick engineering challenges, blindfold-your-friends and ‘programming’ their movement through an obstacle course, and a good old egg drop. There was certainly a lot of learning going on, from social+teamwork to mechanics intuition (building strong things out of weak materials is a wonderful foundation for engineering).

However, I always thought it was a shame the kids didn’t get more hands on time with the expensive robotics tools that were unique to that space. The class met twice a month for less than 2 hours per session, so the actual hands-on experience with robotics was very modest. So, the next year when I was asked to lead the class, I decided I would try my own off-the-cuff teaching with as much robot building and programming as possible.

The usual LEGO bot. Photo credit: nxtprograms.com

Over the course of 2 or 3 sessions with the classic curriculum of building a simple rover and programming it to navigate obstacles, I made a few observations of how a classroom of mixed skill-sets interacts with these robots.

The kids that have experience reading LEGO build instructions (which involves lots of counting, unless you’ve already mastered estimating the lengths at a glance) get ahead while newbies make mistakes that necessitate taking the robot apart (very discouraging for a newbie). So you’ve already got a split classroom where some kids maybe get the feeling that they’re not in the right place.

And it’s the same story with programming: with 2–4 kids per laptop, it’s hard to get around the fact that the kid who’s done it before is going to take the mouse from a newbie struggling to solve the introductory problems, unless you specifically tell them not too, in which case maybe they feel frustrated and slowed down. You can get past that OK by setting the expectation at the beginning of class that people who know how to do something should instruct their less experienced teammate by pointing at the screen, not taking away the mouse, but I still never really liked the dichotomy, and it just got worse as the programming challenges quickly progressed from pre-programmed route to line-following robot. The previous curriculum had each 2 hour session introducing a more difficult programming challenge, but that quickly gets too difficult for kids who have never looked at a program before.

With all of that in mind, I set out to come up with a project that all the kids could start with a fresh slate — a build with programming challenges that none of them had encountered yet. That’s where the robot face pictured above comes in.

https://www.youtube.com/watch?v=X8g4dJPTvKo

I decided being able to turn a motor on to make a mouth open and close + being able to twist some eyebrows up and down would allow for a lot of fun with really basic programs. I take a cue from Rachel Hellenga’s teaching style in thinking that it’s much better for everyone to use the basics in a lot of different ways instead of moving onto very specific uses of more-difficult-to-absorb knowledge.

The best part about building the robot face (A Lego CAD model to help you build your own is here RobotFaceV2.lxf, the software to view it is available from Lego here) is that it allows modular construction where groups can decide how to delegate the parts: advanced kids can pick the challenge of assembling the more complex linkages of the mouth and beginners can have fun picking out different parts to make eyeballs (they certainly don’t have to look like the example robot — so they get to be a little creative here.) If I remember right, some components were even challenging for the adult helpers, and having adults and kids work together on a problem that’s difficult for both of them is my favorite 😉

So our first lesson was simply getting things moving, turning motors on, changing the speed of the motor, learning that you can go 1 revolution at one speed, and the next revolution at another speed, and build patterns of these motor blocks to create patterns in the robot’s movement. Without much prompting there was much puppeting and kids coming up with things to say to accompany the robots miming (typical “I AM A ROBOT” stuff, but still lots of fun.) Also it’s lots of fun to make the robot’s eyebrows wiggle.

Before I had an idea of what the next activity would be, programmer-extraordinaire Caden had set up a couple of buttons to control the robot’s movements live and used his remote control face to tell a knock knock joke. After that it was pretty obvious what we could spend a few weeks on. The next session, each group was prompted to keep their laptops closed, no programming yet! One by one, tell your best knock knock joke to your group. Then decide amongst yourselves who’s got the funniest knock knock joke and in a few minutes we’ll ask each group to tell their joke to the class.

This was my favorite robotics class ever because it got started with everyone laughing at each others jokes. Kids get some ‘public speaking’ practice with each other and have to make a decision as a group, which is a good thing to get practice with, too.

Once each group settled on a joke, they were instructed to program their robots to tell the joke as puppets. They were encouraged to try different strategies, whatever it took to get their robots to talk to one another. This facilitated the different skill levels by allowing different solutions to the same problem. Some students got to try out simply lining up ‘move’ blocks with different speeds, some students got to try using timers and events, some students knew how to use conditionals to add those remote-control buttons, but everyone got to try what they knew how to do and share the result with their teammembers: because even the simplest program solved the problem of making the robot talk, there was no sense of being left behind or being slowed down. Students got to see how other teams were working and asked what their programs did (and getting one student to explain their program out loud to another is really great to see.)

When it came to testing the programs, reciting knock knock jokes along to your miming robot face was a lot more fun to fail than having your line-following robot fail to follow a line. For some reason, when trying to line up the pace of your speech with the pace of the robot’s mouth movements, it’s really funny for the robot to stop moving in the middle of a word, or to keep moving after you’re done talking — I guess because the robot flubbed a joke? Something about it had the kids laughing and I had never been in a programming class where debugging what went wrong was that funny.

Trying out lots of different ways to do the same thing also meant everyone was ready to have a crack at presenting their project at the end of the day — it was pretty much impossible to fall behind, you could just tell your joke using whatever program you had working. Getting a camera and a clapperboard (“Action! *CLAP*”) is always fun for kids, and we recorded a few takes of each groups knock knock joke.



The second iteration of the robot face involves a motor for each eyebrow and a piston mechanism that results in different eyebrow movements depending on which direction the motor is turned (the force of the motor will push or pull on the end of the eyebrow and change what direction it’s pointed.)

I finished designing this face pretty much the day before I wanted to use it, so unfortunately instead of creating build instructions I just built 4 copies. But that meant that the session after knock knock jokes could jump right into giving the robots emotions.

Before programming the robot to express emotions, we had to learn what different emotions looked like. So the activity went like this:

  • Sit everyone at a long table so each person has someone sitting directly across from them. It doesn’t matter if the kids are paired with adults or other kids.
  • Give everyone on one side of the table paper and markers.
  • Instruct everyone on the opposite side of the table to pick an emotion and express it on their face.
  • Instruct the drawing side to draw the expression with the fewest lines possible: just get the shape of the eyebrows and mouth first.
  • Ask the drawing side to guess what emotion the face-maker is trying to express. Just happy, sad, surprised, angry, that kind of thing.
  • Have everyone check their answers with the person across from them and then switch sides.

Don’t make a big deal out of it if someone can’t pick a face to make or can’t make a guess. The important thing for the kids is to spend some time focusing on an expression and practice identifying what it means. This is intuitive to some people, but lots of people have to learn what emotions facial expressions correspond to. At the end of the activity, students will have compiled a list of drawings and corresponding emotions.

The programming activity now becomes moving each eyebrow motor into position to match a drawing. This can also be a lesson in how 60 degrees compares to 180 degrees and so on, because the eyebrows only need to be moved a few degrees to change expression.

This expressive robot face now allows for a storytelling activity: think about what emotions you can get your robot to express, and write a story for the robot to tell (from his/her own perspective, i.e., come up with an identity and backstory for your robot) that would incorporate an emotion. Extra points if the robot’s emotion changes in the story and has its eyebrows move accordingly.

This allowed some of the students who were timid about building mechanisms or writing programs to express their creativity: the quietest kids had some really surprising stories for their robots to tell, and it was really exciting to see each kid decide what role they wanted to take in the project: changing the robot physically (some kids spent their time building props out of LEGO to go with their story — or adding red lights to the face to be laser cannons on their bad guy robot), writing code to control the face, or writing a script and drawing backdrops for the story.

It was a pretty long process to write and produce a story told by robots, so we didn’t get to the point of recording finished projects, but I have high hopes for this format of robotics education in the future.

The Artistic Side of Shenzhen


Imagine my surprise when I learned of a 2-week international jazz festival happening in this city, with artists from Italy, Russia, China, all over, and just my luck it was only the second day! I ended up only catching this one show, “Second Approach”, before leaving the city — a Russian trio of piano, upright bass, and singer. It was exciting to be in this kind of music venue all of a sudden, full of young Chinese jazz fans shouting for an encore.




This whole neighborhood, OCT, really surprised me after staying in the middle of the overcrowded concrete center of Shenzhen. “Overseas-born Chinese Town” is basically a reverse Chinatown, a place where people from all over the world have settled in China but brought international culture back with them. So there are patisseries and cafes and art galleries nestled among some of the most creatively-repurposed warehouses I’ve seen — giant wooden structures that let you slide down from the 2nd to the sidewalk framed by impressive and modern murals. I was pleasantly reminded of Arcosanti — a city whose architecture encourages you to climb onto roofs.





With graphic design firms and art galleries sharing renovated warehouses with shops of creative, handmade one-off goods, it reminded me of the parts of the American rust-belt whose economies are reinvigorated by the ‘creative industry’ — software, design, and technology firms, where money is made with ideas and services instead of physical goods. Many of these new businesses occupy the old warehouses of Pittsburgh, Cincinnati, Chicago and so on, and is often referred to as a post-industrial economy.

Well in OCT, these renovated warehouses are neighboring factories and shipping warehouses where business couldn’t be better. A large part of everything the world consumes is manufactured here. Foxconn is just up the road. With that, OCT struck me as a strange post-industrial utopia surrounded by the ultra-industrial reality of the world’s factories. (I expressed this while walking with some new friends, so I had to explain the notion of being “post industrial” to some people who lived in the most industrious city I’ve ever seen).





Oh my god that astronaut is fixing his flying saucer I love this place.

Hedgehog Programmer

Feb 25, 2015


This week, we all made a FabISP. Knowing we could make any shape we wanted on the Roland Modela, I didn’t think much of making a rectangle circuit board. I brought the ‘traces’ png into Inkscape, traced bitmap, and modified some of the traces to have more curves, and to fit the silhouette of a hedgehog. Just by switching what parts of my image were visible or transparent, I could make my traces file and my cut-out file for the Modela.


Burlap-Resin Composite Boat


Searching youtube for how-tos on composites, there’s lots of videos on boat-making. So I decided, what the heck, why not get started with my boat making career. I made a really rough boat-like shape in Blender and applied a subsurface division modifier to smooth it down. The only foam I had on hand was 3/4″ thick, so I scaled the model and split it into 3 layers, set them side by side in Blender, and import the whole thing into MeshCAM.

MeshCAM generatered the gcode for our 1′ by 3′ CNC machine using a 1/4″ ballnose. Milling through insulation foam with a 1/4″ bit was a real treat — I cranked the speed up to the max and watched it cut like butter. After freeing the individual slices from the foam, I just hot glued them together.

I stacked 4 layers of SuperSap soaked burlap over the foam boat form, wrapped it up in release plastic, layered felt on top of that, and stuck the whole thing in a vacuum bag. We tried using our shopvac and then our smoke sucker, which sucked the bag tight against the form, but didn’t put any pressure on it. So, I ended up setting it in the sink under a trashbag filled with water, which visibly put a lot of pressure on the form.

After unpacking the form, and ripping out the foam (it did not go without a fight), I optimistically set it in the sink full of water, where it promptly sank. It’s totally permeable to water. Gabe’s frisbee floated a lot better. I’ll probably coat it with another layer of resin and let it cure without putting pressure on it. I figure the resin would be more solid with a two part mold, filled with resin (not squeezing the resin out of the burlap). Next time!



Update, a couple of weeks later: after pouring super-sap resin over the hole-ridden burlap boat with multiple applications and slowly spinning the boat upside down, rightside up, to keep the resin moving for about a half hour and cured in the air, the boat is sea-worthy! Unfortunately, the excess resin did slowly seep down to edge of the composite and pooled there, leaving me with heavy chunks of resin that’s just weighing the boat down. I can’t think of a good way to remove this except for a hacksaw.

I’ve also figured out that I’m not a great boat designer. The shape of my hull gives very little displacement, and the boat sits pretty low in the water without any weight (except for the aforementioned excess resin). I’ll look forward to designing a boat worth sticking a motor or sail into later on in life. In the meantime, here’s my burlap boat floating in Lake FabLab (our perpetually flooded parking lot).

Original Blender file with subdivision surface.

STL Export, scaled up to millimeter units.