I’ve run into some debate on the floor about which of the two flavors of XBee antenna gives the most range: Whip (left) or chip (right)?
I can’t get a straight answer from the floor, but science delivers thanks to MaxStream’s research on the issue. Turns out the antenna type only makes a difference for long-range outdoor applications:
Arturo attached the FSRs to the second shoe. Some tweaks were made to the position in hopes of getting better readings. Tom recommended placing the sensors inside the shoe, but for now we’re sticking with the external approach for now since we have it working on the other shoe.
Wear patterns in the shoe informed sensor placement:
I added a multiplexer to the circuit so that we will be able to get analog readings from all 10 FSRs from a single Arduino.
Also, the wireless serial glitches were fixed by adding delay(10) to the Arduino main loop.
When the Arduino’s inputs and outputs just aren’t numerous enough, a multiplexer saves the day.
A multiplexer’s basically just a soft switch — you send it a set of digital on / off values to specify which channel you want to read from, and take a look at the “common” pin with an analogRead() on the Arduino, and then rinse and repeat for the next channel (and the next…) until you have all the values you want.
In this way, you can collect readings from a bunch of sensors with the use of just one of the Arduino’s analog pins (plus three or four digital control pins. You can think of the multiplexer as a basic parallel to serial converter — it lets you take a bunch of different signals and put them into a single stream of data.
In short, it’s an easy way to add inputs and outputs to your Arduino.
It’s also possible to string several together to get control of even more inputs and outputs. More about this, including schematics, is available on the Arduino website.
Multiplexers come in a variety of flavors… 8 channel varieties (like the 4051) use a 3-bit digital channel picker, while 16 channel models like the 4067 shown below use a 4-bit channel picker. Everything you need to know about the pins and channel encoding is available in the data sheet.
The circuit I’m using for the media controller project looks like this. All of the sensors aren’t hooked up, but it gives the idea.
Note The resistor between the common pin and ground is critical — I was getting noisy readings at first; the resistor fixed it:
Here’s some Arduino code to read each channel from a multiplexer and then send each value out over serial in a comma-delimited format:
// 4067 16 Channel Multiplexer
// Based on the code for the 8 channel 4051 available here: // https://playground.arduino.cc/Learning/4051/
// Here's a handy datasheet for the 4067: // https://www.sparkfun.com/datasheets/IC/CD74HC4067.pdf
// How many of the 16 channels do we want to actually read? // set this to a lower number to read a fraction of the channels int activeChannels =16;
// Keep count of which channel we're reading. int channel =0;
// Set the common input / output pin. int pinCommon =0;
// Set which pins tell the multiplexer which input to read from. int pinS0 =2; int pinS1 =3; int pinS2 =4; int pinS3 =5;
voidsetup(){ // Set the switch pins to output. pinMode(pinS0, OUTPUT); pinMode(pinS1, OUTPUT); pinMode(pinS2, OUTPUT); pinMode(pinS3, OUTPUT);
// Fire up the serial. Serial.begin(9600); }
voidloop(){
// Loop through the channels and read each one. for(channel =0; channel < activeChannels; channel++){
// Get the switch states from the channel number, and // send the state to the multiplexer to read from that // channel. This configuration covers all the channels, // but doesn't read them in a sequence that matches the datasheet. // (This works, but needs revision.) digitalWrite(pinS0,(channel &15)>>3);// bit 4 digitalWrite(pinS1,(channel &7)>>2);// bit 3 digitalWrite(pinS2,(channel &3)>>1);// bit 2 digitalWrite(pinS3,(channel &1));// bit 1
// Read the common pin and send it out over serial. Serial.print(analogRead(pinCommon), DEC);
if(channel <(activeChannels -1)){ // Separate each channel with a comma. Serial.print(","); } else{ // If it's the last channel, skip the // period and send a line feed instead. Serial.println(); }
I’m not sure how much more is worth saying about appropriation, orifices like the RIAA /MPAA, and the sad state of copyright law. Lawrence Lessig’s free culture pitch articulates the history of copyright and the necessity of a commons with plenty of precision and conviction. Clearly, any spirit of creative protection in copyright law has lost out to greed. Our best (and last) hope is either the noble contrarians at Creative Commons, or the collective realization that we’re all felons in the eyes of copyright law, so the law had better change. I wouldn’t bet on either.
So, Marshall McLuhan’s work held my interest more tenaciously than Susan Meiselas’s self-righteous kvetching or Shepard Fairey’s (perhaps predictable?) back-stabbing dishonesty.
McLuhan’s take on the significance of how we communicate (rather than what we communicate) is often renowned as creepily prescient of modern times. I should reserve judgment until I’ve finished the book, but once again I think the web and computation have disrupted the thesis. Unlike print, or radio, or television, or film, computational media lend themselves to transmogrification between traditional forms. How could you begin to classify the web as hot or cold, when it entangles so many divergent media into one? At ITP, it seems like our mode of production emphasizes creation and manipulation of media over content, a lateral move that might emphasize McLuhan’s “medium is the message” conclusion.
[ For discussion: The problem with digital abstraction… who can own a sequence of bits, when the content actually lies in the interpretation of that data, and not necessarily in the sequence itself? For example, I could write a song that happened to use the exact same bit sequence that describes Meiselas’s molotov man. When the bits are played as an mp3, it’s one thing, when interpreted as, say, a jpeg, they become something else. Who owns what? Can you really own a string of 0s and 1s that could have been generated and interpreted in any number of ways? ]