So is this device even interactive? From a user’s perspective it isn’t very interactive…It just distributes a message when a table is open. However, from the hostesses perspective at the restaurant it is interactive. It can listen to the hostess as he/she sets the designated table and it can respond to her request when the table is open – thus allowing me to come back to the restaurant.
What are the difficulties with this product? Well for one thing it is ugly and large. It can easily be stolen and it doesn’t give the user much of a clear idea to when the table will actually be ready. It’s like waiting for a train without knowing when the train will come. It’s range also seems a bit short if the area is sparse (as it was in my case). It also isn’t very entertaining as many people using this divice are in a state of purgatory waiting for their table. Ok – let’s stop hating…What is good about the device? Well…to start – the messaging is very clear. Even without being told how it works I think anyone can understand the language of the vibration and blinking LED’s versus it’s idle state where it is a cold hard object. It seems to be very reliable and has a good control with a hostess that can send out a message on command.
Perhaps the device could be better if there was a game included for bored customers waiting. Perhaps there can be a better visual indication or a timer that lets the user know how much time they have before they have to run back to the restaurant. Perhaps the shape can be more interesting as well, or more appealing, or latch on to an existing device such as a watch or cellphone.
When sending this serial data we use a flow of serial communication (Serial.begin(9600)). However, when generating highly graphical work this can potentially cause sluggish response times and fill the Serial buffer (or so I’m told). In order to avoid these issues I also learned about the handshake method. This method only sends out the Serial data when requested rather than flowing at the standard 9600 bits per millisecond. The handshake method involves creating one extra function in processing that uses Serial.available() to only send data when it is greater than 0. Processing then sends a byte to Arduino for it to retrieve the desired information. Below is the video of this and the code.
import processing.serial.*; boolean firstContact; float bgcolor; // Background color float fgcolor; // Fill color float xpos, ypos; // Starting position of the ball Serial myPort; void setup() { size(570, 350); //println(Serial.list()); String portName = Serial.list()[0]; myPort = new Serial(this, portName, 9600); myPort.bufferUntil('\n'); background(0, 240, 150); } void draw() { background(bgcolor); fill(fgcolor); // Draw the shape ellipse(xpos, ypos, 20, 20); } void serialEvent(Serial myPort) { String myString = myPort.readStringUntil('\n'); //read the serial buffer // if I have any bytes other than the linefeed: if (myString !=null) { myString = trim(myString); //if I haven't heard from the microcontroller yet, listen: if (firstContact == false) { if (myString.equals("hello")) { myPort.clear(); //clear the serial port buffer firstContact = true; // i've had frist contact from the microcntrl myPort.write('A'); //ask for more } } //if I haven't heard from the microcontroler, proceed: else { //split the string at the commas and convert it to integers int sensors[] = int(split(myString, ',')); //print out values received: for (int sensorNum = 0; sensorNum < sensors.length; sensorNum++) { print("Sensor" + sensorNum + ": " + sensors[sensorNum] + "\t"); } println(); if(sensors.length>1){ xpos = sensors[2] * 255; ypos = map(sensors[1], 0, 580, 0, height); bgcolor = map(sensors[0], 0, 1024, 0, 255); } } myPort.write("A"); } }
Lastly, to get creative I used a potentiometer and an FSR to create an Etch-A-Sketch. I ideally would like to have two potentiometers for it to function properly, but the prototype concept can be seen here. It would also be great to add a ball switch on the piece that would erase the sketch every time the device is flipped upside down.
void setup(){ Serial.begin(9600); } void loop(){ int analogValue = analogRead(A0); int brightness = map(analogValue, 170, 790, 0, 255); Serial.write(brightness); }
Below is the code from Processing:
import processing.serial.*; float xPos = 0; Serial myPort; void setup() { size(570, 350); //List all the available serial ports println(Serial.list()); String portName = Serial.list()[0]; myPort = new Serial(this, portName, 9600); background(246, 249, 0); } void draw() { } void serialEvent(Serial myPort) { float inByte = myPort.read(); println(inByte); float yPos = height - inByte; stroke(2, 100, 185); line(xPos, height, xPos, height- inByte); if (xPos>=width) { xPos=0; background(246, 249, 0); } else { xPos++; } }
In this lab we also learned about ASII Dec values versus their Characters. When using Serial.println() one receives Dev values, while when using Serial.write() one receives characters. An ASII table can be found here. More information on Serial communication can be found on my awesome teachers blog (Co-Founder of Arduino – Tom Igoe).



