rpaetz – F15 60-223: Intro to Physical Computing https://courses.ideate.cmu.edu/60-223/f2015 Carnegie Mellon University, IDEATE Thu, 17 Dec 2015 20:19:25 +0000 en-US hourly 1 https://wordpress.org/?v=4.5.31 Visualizing Arduino Data https://courses.ideate.cmu.edu/60-223/f2015/visualizing-arduino-data/ https://courses.ideate.cmu.edu/60-223/f2015/visualizing-arduino-data/#respond Thu, 12 Nov 2015 16:42:45 +0000 http://courses.ideate.cmu.edu/physcomp/f15/60-223/?p=10689 Arduino has come out with a serial plotter, but it leaves a lot to be desired. In order to visualize Arduino data, I have had better luck with processing. There is a sample program on the arduino site: https://www.arduino.cc/en/Tutorial/Graph. The processing code is a comment in the arduino sketch. You can download processing at: https://processing.org/download/

Also, the processing code didn’t work for me at first. I added the code I used at the end of this post, but it would be good to look at the code in the arduino sketch since it has a good way to draw a line graph.


// Example by Tom Igoe

import processing.serial.*;

Serial myPort; // The serial port
PFont myFont; // The display font
String inString; // Input string from serial port
int lf = 10; // ASCII linefeed
int xPos = 0;
void setup() {
size(600,600);
// You'll need to make this font with the Create Font Tool
//myFont = loadFont("ArialMS-18.vlw");
//textFont(myFont, 18);
// List all the available serial ports:
printArray(Serial.list());
// I know that the first port in the serial list on my mac
// is always my Keyspan adaptor, so I open Serial.list()[0].
// Open whatever port is the one you're using.
myPort = new Serial(this, Serial.list()[0], 9600);
myPort.bufferUntil(lf);
}

void draw() {
background(0);
// get the ASCII string:
if (inString != null) {
// trim off any whitespace:
inString = trim(inString);

/* replace this code with code to draw your data
String[] vals = inString.split(",");
// convert to an int and map to the screen height:
float y = float(vals[0]);
float x = float(vals[1]);
y *= -1;
x = map(x, -100, 100, 0, height);
y = map(y, -100, 100, 0, width);

// draw the line:
stroke(127,34,255);

arc(x-5, y-5, 10, 10, 0, 2*PI);
*/
}
}

void serialEvent(Serial p) {
inString = p.readStringUntil(lf);
}

]]>
https://courses.ideate.cmu.edu/60-223/f2015/visualizing-arduino-data/feed/ 0
Mobile Robot: “Explorers” https://courses.ideate.cmu.edu/60-223/f2015/mobile-robot-explorers/ https://courses.ideate.cmu.edu/60-223/f2015/mobile-robot-explorers/#respond Sat, 24 Oct 2015 03:07:36 +0000 http://courses.ideate.cmu.edu/physcomp/f15/60-223/?p=10591 Explorers is a simplistic model for how humans learn to interact with their environment. To accomplish this, we implemented a machine learning algorithm using Markov Chains which allows the robots to make decisions based on its current state as well as its previous actions. In this way, the robots are introspective and can draw from their “short term memory” in their decision making process.

DSC_0581

When the robots first interact with the environment, they only have a basic self-preservation instinct which is to not leave the black rectangle. As they begin to explore their environment, they also make mistakes such as crashing into objects thus changing or destroying their environment. Additionally, outside participants can induce stimuli by shining the robots with a flashlight. The robots can then choose whether they will respond to this stimuli, similarly to the way humans choose to respond to uncontrollable environmental stimuli. Over time, each robot develops a different set behaviors based on its individual experiences in a particular simulation. However, both robots will converge to a set of behaviors in which they respect their environments.

YouTube / arathorn593 – via Iframely

We constructed this project using a Pololu 3pi Robot. We focused on using an ultrasound distance sensor and photoresistors as our sources of input and programmed the robot to learn how to maneuver around obstacles and potentially avoid bright lights. With respect to the design of the robot, we wanted to create a playful, friendly atmosphere to create empathy between the spectators and the robots rather than making them seem like machines.

DSC_0596

Documentation:

]]>
https://courses.ideate.cmu.edu/60-223/f2015/mobile-robot-explorers/feed/ 0
“ivee” by Interactive Voice (2014) https://courses.ideate.cmu.edu/60-223/f2015/ivee-by-interactive-voice-2014/ https://courses.ideate.cmu.edu/60-223/f2015/ivee-by-interactive-voice-2014/#respond Thu, 10 Sep 2015 06:33:01 +0000 http://courses.ideate.cmu.edu/physcomp/f15/60-223/?p=10198 Ivee is a voice activated personal assistant alarm clock for your home. Like most voice controlled devices, it uses a key phrase that must be said (in this case “ivee”), after which the device makes a chime and the user can speak their command. Ivee can do a variety of tasks as a stand alone product such as play radio, check stocks, check the weather, etc. However, if the user also owns other IoT devices, ivee can connect with them and allow you to control those other devices with your voice. This is arguably ivee’s key feature. Currently ivee can connect with many different smart home companies such as Hue, Iris, Nest, and WeMo. This allows ivee to control lighting, temperature and more. Finally, it does not abandon its responsibility as a clock: it can also tell you the time.

Vimeo / ivee – via Iframely

]]>
https://courses.ideate.cmu.edu/60-223/f2015/ivee-by-interactive-voice-2014/feed/ 0
“Piper” by Icontrol Networks (2015) https://courses.ideate.cmu.edu/60-223/f2015/piper-by-icontrol-networks-2015/ https://courses.ideate.cmu.edu/60-223/f2015/piper-by-icontrol-networks-2015/#respond Thu, 10 Sep 2015 06:15:53 +0000 http://courses.ideate.cmu.edu/physcomp/f15/60-223/?p=10187 Piper is a home security product that also links together other home automation products. The primary function of Piper is its camera. With a large field of view, Piper’s camera can monitor an entire room or open area of the user’s home. The live camera feed can be monitored remotely through a smartphone or tablet. Notifications can also be sent when Piper senses movement or when a connected IoT device is triggered. A user remotely monitoring their home can also use Piper to interact with people on the video feed. The primary motivation for using Piper is peace of mind. Piper allows the user to check in on their family, pets, things, etc. any time they feel worried about their safety. Additionally, the notification feature allows the user to know what is going on at their house in real time.

YouTube / Piper – via Iframely

]]>
https://courses.ideate.cmu.edu/60-223/f2015/piper-by-icontrol-networks-2015/feed/ 0
“Mother” by Sense (2015) https://courses.ideate.cmu.edu/60-223/f2015/mother-by-sense-2015/ https://courses.ideate.cmu.edu/60-223/f2015/mother-by-sense-2015/#respond Thu, 10 Sep 2015 05:58:54 +0000 http://courses.ideate.cmu.edu/physcomp/f15/60-223/?p=10160 Mother is a product that consists of a base station (also called Mother) and sensor “cookies” that the user can attach to a variety of objects. The Mother connects to all of the cookies and to your phone. This allows the user to be notified of events from the cookies. The cookies have temperature and motion sensors, and the activity that they track can be easily set and changed. This means that the user will not have to buy a huge number of the cookies if they are willing to switch them regularly. The adaptability of the sensors also allow for daily goals to be set and tracked, even if the goals vary wildly from day to day. Some examples that Sense gives for possible uses are: activity monitoring, pill schedule notifications, child tracking, and ranking who is the best at tooth brushing.

Vimeo / Sen.se – via Iframely

 

]]>
https://courses.ideate.cmu.edu/60-223/f2015/mother-by-sense-2015/feed/ 0