Andrew@Milmoe.com
Physical Computing Spring '01 Journal
 

Highlights

James Beam Video Documentation
(~90 sec. 3Mb Quicktime 4.0)
Final Project The Kissing Booth

 

 
Week
of

Notes - Back to Milmoe.com

Details
1/24/01

Switches...

Went to Radio Shack for switches and any funky LEDs. Found an LED for creating numbers.

Picked up slide switches, one that detects the presence of a magnet, and an 8 position dip switch.

I also bought a project box (a small box for art supplies) and mounted the breadboard inside with zip ties.

 

"Radio Shack, you've got questions, we've got blank stares..." -name withheld

Friendly service, just don't ask them about the electronic parts section.

 

First program

Created a "Hello World" program by creating a string that contained "HELLO" then used a series of subroutines.

Pseudo Code

Do from 1 to the Len of message
Mid out the first character
pass the letter to the choreography routine
Loop

Choreography routine
Draw the letter
Delay for a second
Call Black
Delay for 1/5 second
End

Convert the letter to ASCII
Case to the ASCII number
H light the pins that would draw an H
E light the pins that would draw an E
...

Black out the LED
Turn all pins off

 

The code for this was replaced by the Second program. They essentially do the same thing.

 

Second program

Created a counter from 0-9 using a matrix to contain the pin mappings. Basic X does not allow subroutines to share 2D arrays so I wrote out the mapping as 8 digit binary numbers stored as bytes in a 1D byte array.

Pseudo Code

Test each pin for contact.

Award score if contact is made even for a moment (this is just in case the dart falls out.)
Add up score.

Display score

If reset switch is set then reset score.

Construction

I took the dart board for a dart gun that my brother gave me for Christmas. (Self defense for East Village living?) and wrapped it in aluminum foil (Ground) then covered the front with a sheet of paper as an insulator. Each celebrity was wired with 5V coming from a set of three pins. When the darts poke through contact is made, and the score goes up.

Ricky Lake 1 point
WWF Wrestler 2 points
George W. Bush 3 points

 

Results/Observations

Well, people seemed a bid disturbed by my attaching celebrities to a dart gun board, but it's hardly a new idea. Of course the thing worked better when I tested it the night before.

Hyemi Cho helped me braid my own extension wire, next time I'll use phone cable.

Keep the backs of the boxes and instructions that the stuff comes it. I lost the LED box and had to trial-and-error guess the pin assignments.

 

The code
Final Version
(indents lost... sorry)

(Note this code was made obsolete by the code used for the Lobster stupid pet trick)



 

1/31/01
Top

Analog I/O

We learned about relays and switches today.

Pseudo Code

Make both Pots input center at 0 when the balance board is parallel to the floor and James is straight in the air.

Compare the balance board to the position of James. If the board is down on the left move James Counterclockwise and vice-versa.

If James goes too far left or right you lose... reset and return to center.

Cool stuff...

When using a photo cell the light should be contrived in some way. Ambient light is difficult to control.

I bought a "Rocky the Lobster" at the Bradley's going out of business sale. I should have bought 10+ since they were selling for $3 a piece. Duh... Oh well, live and learn.

Gutted Rocky to find that he was only 2 DC motors and a little circuit board, a couple of switched and a speaker.

My good friend Josh lent me a remote control air plane, muscle wire, and a really small remote control transceiver with servos.

Got my hands on an old bar code reader that Wired gave people with their subscriptions in an attempt to increase the value of their advertising... Hope to install it in Rocky's nose at some point.

Bummers

The "servos" I took from the airplane turned out to have 5 wires connected to them. DC motor +/- and 3 Pot leads... So I had to create my own servo logic. More work, but more fun.

We did not show in class the following week. Oh, well. James Beam is still a good project... video taped for later editing.

I should replace the pot with a tilt sensor (home made or otherwise) when I get a chance. The current configuration places too much force on the pot axle.

 

 

AnalogDrunk code (running "James Beam")

James Beam Video Documentation
(~90 sec. 3Mb Quicktime 4.0)

Special thanks to Robert Pietri the coeditor of the video, Josh for allowing me to dismantle his remote control plane for the "servo", and Tom Waits for being a cool musician. Sorry it's not well lit...

 

Semi-Random Research:
Hacking the "ueC atC"... thanks to:
http://www.flyingbuttmonkeys.com
Truth is stranger than fiction.
Also, making a Keyboard to serial device

-Looked up and ordered my own muscle wire.

-Courtney gave me some extra Elwire.

-Found a site on floatation. What's multimedia studies with out the study of no media?

2/07/01
Top

Serial Communications

I outgrew my project box and Created Box 2.0 which was based on Will's box and then duplicated from there. I installed two female Din connectors so that I could attach Comm 1 and Comm 2 to my box at the same time without fear of them being ripped out when someone (like me for instance) trips over the cord. Used "the nibbler" to cut in to the box. Also added a two channel speaker clip so that I can run leads to the outside world from inside the box without soldering.

I also picked up an organizer box to to keep track of all the small parts.

Installed Java and javax.comm on to Firmware 3. It worked, but not until I managed to fry the ADCs on both of my BX24's. Check twice where you send the power coming from the serial TX... it's more than 5V.

 

Photo's to come. I'll also make a mini tutorial on how to build a "Milmoebox" including several examples.

- Buy a plastic box with a lid
- Drill a 3/8" hole (big enough for the nibbler) for each port. Two serial ports (chip programming and serial I/O), reset switch, power in (x2?), indicator LEDs (optional), whatever else...
- Hot glue the various parts in place, ensuring that the cable will seat well. (Some items mount better from the inside, some outside.)
- Mount breadboard to foam core using wire (or Velcro if you want to be fancy)
- Smoke a cigar, you're done!

2/14/01
Top

Show Serial Communication Project

My project seemed a bit lame in comparison, but I took on doing serial communication with a Java class instead of the prefab Director approach. It worked at the 11th hour, but I want to spend a lot more time experimenting with it in the near future.

I basically got a Java version of WinTerm to talk to the BX24. No small feat in and of itself.

Floatation

In an effort to continue to try just about everything at least once I went to a floatation tank. It was very cool and I highly recommend it. I think I'll have to go a few times in a row in order to really get the gist. The first time is not as relaxing because you don't really know what to expect. More on that when I go for multiple sessions.

 

Java Serial Communications API
(class javax.comm)

2/21/01
Top

Tool Safety/Discuss Stupid Pet Trick

Given my an industrial design background I already have a good clue when it comes to tool safety. Still, you can't be too safe.

Power supplies came in... discovered that the output does not match what it says on the slide switch. Grrr.

Stupid pet trick - Lobster API

My goal with the stupid pet trick was to create an API for the Lobster (or any set of output devices) that would perform a pre-coded sequence based on a given numeral (0-9). This would allow data from the bar code reader to be translated in to a sequence of "dance steps" that the lobster would perform.

I created a series of rows 0-9. A number for each sequence. And the sequence as columns. For instance... Head up/mouth closed for 4 units of time, tail up/mouth closed for 2 units of time, head up/mouth closed for 3 units of time. Head up/mouth open for 2 units... etc.

I connected Rocky to some relays and an H-bridge made from a DPDT relay. I took three power supplies. 5V for the BX24, 9V for the large H-bridge relay, and 7.5V to get Rocky hoppin'

The code went through several versions. (Insert pseudo code here) First I tried to store the variables in a 2-D array... no good, 2-D array can not be shared as persistent variables in the EEPROM.

Then I tried filling and flushing a queue. That would work, but as I got closer I realized that I could just load the data from a file into the EEPROM and then call it back as a 2-D array. (They should mention that as an alternative in the $%@$ manual)

 

Pet trick code

Lobster.txt (Lobster sequences for prototype purposes.)

LobsterTrap.bas (Final Code)

2/28/01
Top

Show Stupid pet trick

Pet trick went fine. Rocky was a little stubborn and required assistance lowering his spring loaded tail, but hey he's a stupid pet.

 

Need to document pet trick...
  Continue to Part 2 - The Kissing Booth  
  All photographs and artwork (c) Andrew Milmoe 2002 unless otherwise noted.