A Magic Trick Four Years in the Making

When I get ready to go out, I check to make sure I have the essentials:

    • Wallet – check
    • Watch – check
    • Pants check
    • Extra Pants check
    • Binaca – check
    • Three of Diamonds – check

For almost 4 years, I have been carrying around a “Three of Diamonds” in my front pocket. I wanted to pull off a surprising magic trick using this precise card. The trick involves asking somebody to pick a card from an invisible deck of cards. I would say, “Pick any card,” as I fanned out a pretend deck of cards. My hope was that the trickee would pick the “Three of Diamonds”. If I could produce the card they were thinking of, they would be amazed – they would have to be.

Three of Diamonds

I chose the “Three of Diamonds” for one main reason – if someone picked it out of the blue, it would be unlikely that I was prepared for that exact card. “Ace of Spades” of “Queen of Diamonds” would be obvious, but a three – none one would pick that one.

My thoughts were right, no one picked the three of diamonds for a long time, 4 years or so. I had to play it off as a joke when they said some card other than the 3 of D. Almost half the time someone picked an Ace of something.

But patience paid off. I was at a party recently and I got to try my trick again. I saw a group of ladies that were friends of friends that I had met a long time ago. I started up a conversation. I wanted to say the words “Three” and “Diamonds” in the chit-chat. After so many wrong picks, I thought that I would start stacking the deck so to speak. I had to be subtle though.

“Alright, I want you to think of any card…” I waved my hands to mock a magician and got a smile. “Pick any card… Do you have the card?… Can you see it?” She said, “Yes!?”

I dug out the hidden “Three of Diamonds” and said, “Is this your card?” She opened her eyes and reacted with total amazement. She immediately wanted to know how I just did that. “It’s magic. I am magical.”

I have since retired the trick. I didn’t want to be that guy that does magic tricks at parties. How annoying is that guy?

TouchShield Slide Two-way Communications

Over last summer, I got the GamePack from Liquidware which includes a touch screen display, joystick, microcontroller, and battery pack. With this kit you can make a GameBoy from scratch. With some blood, sweat, and tears, I was able to re-create some games like Asteroids and Tetris.

The touch screen is called the TouchShield Slide which is a 320×240 OLED and resistive touch screen. The screen also has a microcontroller that is Arduino compatible and expands your program space. Since the screen is really a microcontroller in disguise, it can be used for many types of projects. Overall I am very happy with the screen, but I realized I didn’t know how to use it very well. I set out to learn and develop a protocol / reusable library that allows the screen to talk to a microcontroller and vice-verse. So I wanted to take a moment and explain what I learned – maybe you can get going faster than I did.

The Goal

My goal is to be able to display data on the screen that has been received from another device. The data requested would be initiated by a touch on the screen. The protocol has to be consistent and reliable, while being flexible enough to be the basis for future projects.

Touch -> TouchShield Slide -> Arduino -> TouchShield Slide

Programming Tips and Tricks

I found quite a few libraries and resources on liquidware.com.  I also discovered quite a few important things through my trial and error. My biggest frustration was with programming and figuring out the IDE. Here are some tips.

  • To program the screen use the Antipasto Arduino / Aardvark IDE
  • Program the screen and Arduino separately – make sure the IDE has the proper device selected
  • To put the screen in program mode, press the switch beside the power connector – it’s in program mode when the LED on the backside is red

TouchShield Slide Serial

Serial data sent and received by the TouchShield Slide uses the hardware serial lines.

To setup the serial connection, place this line in your setup code block:

Serial.begin(9600);

Now you can read and write to and from the serial buffer. To read in a whole string, use a byte array to store bytes from the serial buffer when serial data is available. To write to the serial buffer, simply use serial print.

char charIn = 0;
byte i = 0;
char stringIn[32] = “”;

while(Serial.available()) {
charIn = Serial.read();
stringIn[i] = charIn;
i += 1;
}

Serial.print(“A”);

Arduino Serial

On the Arduino side, you have to use some form of Software Serial that sends and receives data on Pins 2/3. I have found that the Adafruit SoftSerial Library, “AFSoftSerial.h”, works the best. It seems to be reliable and produce consistent results when talking to the TouchShield Slide. Reading and writing from a software  serial buffer is about the same as a hardware one with this library.

To use software serial, follow these steps:

  • Include the “AFSoftSerial.h” library in your Arduino code header space
  • Define the RX and TX pins
  • Instantiate the software serial
  • Initiate the software serial line
#include AFSoftSerial.h

#define RX_PIN 3
#define TX_PIN 2

AFSoftSerial touchSerial = AFSoftSerial(RX_PIN, TX_PIN);

void setup() {
touchSerial.begin(9600);
}

Demo Project

I took a moment to put together all of the things that I learned into a quick demo project. This project displays a random number on the screen. The random number is being generated by an Arduino, sent via serial, and requested by a touch of the TouchShield Slide.

Random Number from Arduino Displayed after Detecting a Touch…

Visit Liquidware’s App Store to download the source code and library for this demo project.

Physical Security Book Published

Physical security is video surveillance, entryway access, and sensors. In other words, it’s a network of things to protect and secure physical areas. Traditionally this network was analog and serial, but today it’s converging through the use of the Internet Protocol (IP). IP allows you to build a physical security network using one network and probably the very same network that you already have in place. Transitioning over to IP also gives rise to a lot more features and software based analytics. Physical security is just as important as network security.

Tim Dodge and I wrote a book last year about transitioning from analog to IP-based security systems called, “Introduction to IP-based Physical Security”, published by TESSCO Publishing. The book is meant to be a jump start for those heading over to IP-based physical security and video surveillance.

Today I had the thrill of opening up a box with a few publication samples. I know we are in a digital age, but I have to admit that it was cool holding a book with an ISBN and a barcode on it…

IP-based Physical Security

I look forward to running into this book in a used bookstore and/or being the reason for a book burning.

I am LOST

All of this snow caused me to get trapped between two airports recently. And when I say, “trapped,” I mean I had a cell phone, food supply, laptop, and stable wireless Internet connection. I had some time on my hands. Between runs to Panda Express and the restroom, I was able to watch the first season of LOST.

Over a period of 3 months, hints were dropped which lead me to want to start watching LOST – I finally “listened to the island.” I saw a speech by J. J.“ Abrams, 3o Rock made a LOST reference, my friends were talking about the show, the answer is 42, and I heard a faint radio transmission on my XM. I finally broke down and watched the pilot episodes of LOST on Hulu. I was hooked.

Over the next 24 hours, I watched the entire first season – all 24 mind-bending, awe-inspiring, jaw-dropping, uber-frustrating episodes. I see why this show is popular, it has all of the elements that I love – great mystery, tied with philosophical nuances and solid characters who I love to learn about. I want to figure it all out, but I am being messed with. Numbers and non-linear flashbacks spliced in the real-time storyline all make for a fantastic mind trip.

The final season starts tomorrow. I am so glad to hear there is a final season. It will make my LOST time seem worth it, since I know it will have to have an ending and soon. I look forward to the rest of the seasons and catching up to the new episodes. I will be DVR’ing the new ones and maybe I will be able to finish this series with everyone else.

4-8-15-16-23-42

A New Set of Downs

A lot has changed for me in the past 10 years. I have watched the Internet go mobile. The web has come a long way since the 90’s – my Geocities website is a faded memory. I have owned domains that are over 16 years old. If they were children, they would be graduating high school, voting, and starting their credit ratings. I can’t start to imagine what will happen in the next decade. I hope to be a part of the story though. I wish you well as we venture together.

Stay thirsty, my friends.

Steam Pumpkin – My Steampunk Pumpkin

Halloween is one of my favorite times a year being ShadowLord and all. I was BatMan three times in my life and only once as a kid. Pumpkin carving is something I also get into. My first pumpkin at age 9 was an old farmer smoking a pipe. It even had a twinkling red LED in the corncob pipe. After burning up a handful of LEDs my dad taught me about current limiting resistors.

Fast forward 20 years and I am still shoving LEDs into pumpkins. This year my inspiration comes from steampunk, a growing subculture fascinated with steam-aged garb and future technology fusion. Steampunk was born of the H. G. Wells and Jules Verne visions of futuristic technology and style. Call it what you want, Steampunk is an inspiring movement of makers and re-users of technology and materials.

Here is my steampunk inspired pumpkin.

Where do you start?
I cobbled together whatever I could find that resonated steampunk. I found my Mom’s old purse that had some faux leather, brass loops, and a gold chain. I also grabbed an old candle holder, a lamp shade, a door hinge, a metal coffee filter, and some brass brads. My Dremel was used to drill, cut metal, and and cause sparks (insert grunt).
Full of hot air
I knew that I was going to add some technology to the design and I settled on an automated fog machine that would blow smoke from the ears of the pumpkin. Okay, I know it’s a little literal, but it is a steam pumpkin.
How do you do that?
Using the ioBridge IO-204, I rigged up the fog machine to trigger when someone walked in front of the pumpkin. I used a passive infrared sensor from Adafruit to detect motion. The IO-204 has an upcoming feature that allows for on board logic, meaning you can break off of the Internet and have local controls take over. To integrate it with the fog machine, I tapped into the wireless remote control that came with the fog machine. This made it easy to control using a single relay. To light the pumpkin, I bought a BlinkM RGB LED Blaster from Sparkfun. The LEDs are high intensity lights that you can mix colors together. It turned out to be a neat touch. When someone gets close, I set the color with the IO-204 to an evil red to accompany the smoke.

For more information and more “How-to” detail, check out Instructables.com.

Introducing The Steam Pumpkin
Here is a YouTube video of “Steamy Wonder” in action:


Will Windows 7 be better than Vista?

“Will Windows 7 be better than Vista?” is the wrong question to be asking. We should be asking, “Will Windows 7 be better than XP?”

Chris Hernandez of Microsoft posted on his blog, “One of the main goals with Windows 7 in general has been to be better than Vista.” Chris’ quote scares me. Being better than Vista is not what I am looking for. I want an OS that makes me want to upgrade from XP. XP has served me well and I want a clear upgrade path. What are the killer new features? What makes Win7 an “upgrade”?

I have been using Windows 7 on my laptop for a few months. I do like some UI improvements, but compared to XP it misses the mark. Compared to Vista, Win7 is better. Although, Win7 requires pretty good hardware to install where XP is able to install on my pieced together machines with parts 8-10 years old in some cases. I hope by the time Windows 7 is on the shelf, someone figures out that we are not looking for an upgrade from Vista, we are looking for a real upgrade to XP.

She Thinks My Toaster is Hot

One day you put your toaster on a social networking site. And then on another day you find out that your toaster has more friends than you.

Twitter Toaster System

This little story sounds made up. Well, it’s not.

My toaster has had a Twitter page since December 2008, tweeting the status of my toast making habits for all of the world to follow. On occasion people even write to the toaster to ask what it’s toasting. Oddly enough, it can tell you.

I get asked, “Why have your toaster on the Internet?” Well, it’s a starting point for future projects and part sarcasm. I have been working on gizmos, web control, and power / resource management projects with my friend Jason Winters of ioBridge for over a decade. One day I had the idea to overlay appliance usage data onto a graph of my power consumption for my house. My theory is to use this appliance meta data to reduce the power I use everyday by pointing directly to the power hogs. It’s a start to my internet of things at my house. If you want to get start your own Skynet, visit Wired’s Wiki on making things talk. I use the IO-204 control and monitor module from ioBridge.com.

OK, mostly it’s sarcasm.

My Toaster has been recently written about on Wired.com, ReadWriteWeb, PC World, Tiscali, De Morgen, XYCity China, etc. If you want to hear about it straight from the bread slot, you can get live updates from my toaster by following @MyToaster on Twitter.

I am now jealous of my toaster which has made for awkward moments when I want some crunchy Wonder Bread.

Wireshark 1.2.0 – New Version

Wireshark is a tool that performs packet and protocol analysis on a network. Packets are the virtual transport mechanism that moves are data from sender to receiver. Each packet has a header and payload – the header contains information about where the packet came from and where it’s going, as well as the protocols being used. The payload has our actual digitized data – parts of website, text, a section of photo, or a clip of audio from an MP3 or a phone call. If you don’t get all of the packets then a phone call may sound choppy or it may take a while to download a complete file. Wireshark allows you to take a look at the packets you are sending and receiving and learn a lot more about what it happening and what’s breaking down. Wireshark is not for the lighthearted, as the tool requires knowledge of protocols and a deep understanding of OSI, IP, and TCP/UDP at the very least. But, with time, Wireshark becomes invaluable to the troubleshooting process. I have relied on the tool for my work supporting Voice-over-IP (VoIP) and system and application connectivity. The only side-effect to Wireshark is that you will soon realize why it’s not a good idea to surf the web in a public spot (without a VPN or encryption).

The new version of Wireshark includes more protocols that it will decode, supports 64-bit Windows, and has GeoIP integrated support. Also, Wireshark works perfectly with my passive network cable. Visit www.wireshark.org to download the latest version and learn more about it.