49713 Designing for the Internet of Things
· 18 members
A hands-on introductory course exploring the Internet of Things and connected product experiences.
"SupBae! - Let's Go!", a tiny lamp (a tiny cat with a balloon) that non-intrusively tells your loved one you are thinking about them and then invites them for an outside adventure.
The first proposed idea was to make a knitting bowl /speaker that could create Spotify playlists while my friend was sitting down with his music and knitting. He could add a new song by pressing the yarn balls in the knitting bowl with his feet and not have to put down his needles and yarn.
However, the *previous* idea was to have a knitting bowl which had a sensor that when pressed, could communicate to your SO that you were knitting at home. Speaking with my friend, he thought it a bit invasive being guilt-tripped into checking-in with an emotionally needy person whenever he used his knitting bowl. This was directly at odds with what he associated with knitting – an internal state of creative meditation and a quiet exercise in finger dexterity.
Solution:
The idea evolved quite dramatically into "SupBae! - Let's Go!", a tiny desk/table lamp (a tiny cat with a balloon) that non-intrusively tells your love one you are thinking about them and then invites them for an outside adventure. Instead of a one way check-in system, this is a way to actively engage with the other person.
When the lamp is sitting on your desk, the balloon is bright white. However, when the force sensor has a light touch applied to it, the balloon turns blue and emails your SO "Sup Bae. Thinking of you." through IFTTT. When more pressure is applied, the balloon shifts to magenta and follows up with another email that says "Let's go! Want to go for a penny walk?". I believe it's a light touch way for couples to engage with one another.
#include <neopixel.h> // This #include statement was automatically added by the Particle IDE.
#define PIXEL_PIN A5 // IMPORTANT: Set pixel COUNT, PIN and TYPE
#define PIXEL_COUNT 1
#define PIXEL_TYPE WS2812
Adafruit_NeoPixel strip = Adafruit_NeoPixel(PIXEL_COUNT, PIXEL_PIN, PIXEL_TYPE);
int fsrPin = A0; // Define a pin that we'll place the FSR on. Remember to add a 10K Ohm pull-down resistor too.
int fsrReading = 0; // Create a variable to hold the FSR reading
int ledPin = D2; // Define a pin we'll place an LED on
int ledBrightness = 0; // Create a variable to store the LED brightness.
void setup() {
pinMode(ledPin, OUTPUT); // Set up the LED for output
strip.begin();
uint32_t c = strip.Color(0, 0, 0); // Turn off neoPixel
strip.show(); // set updates to the strip
delay( 100 );
Particle.variable("force", &fsrReading, INT); // Create a cloud variable of type integer called 'force' mapped to flexReading
}
void loop(){
int state = LOW; // Turn ledPin off
strip.begin();
uint32_t c = strip.Color(0, 0, 0); // Set color to white
for( int i = 0; i < strip.numPixels(); i++ ){
strip.setPixelColor(i, 0); // Turn off neoPixel
strip.show();
delay( 100 );
}
fsrReading = analogRead(fsrPin); // Use analogRead to read from the sensor. This gives us a value from 0 to 4095
ledBrightness = map(fsrReading, 0, 4095, 0, 255); // Map this value into the PWM range (0-255) // Map this value into the PWM range (0-255)
analogWrite(ledPin, ledBrightness); // fade the LED to the desired brightness
delay(100);
if( fsrReading > 100 && fsrReading < 500 ){
uint32_t c = strip.Color( 0, 0, 255 ); // Set color to Blue
for( int i = 0; i < strip.numPixels(); i++ ){
strip.setPixelColor(i, c); // Set a color
strip.show();
delay(10 );
Particle.publish("SupBae", "sent");
delay(2000);
}
}else if( fsrReading > 1000 ){
uint32_t c = strip.Color( 255, 0, 255 ); // Set color to Blue
for( int i = 0; i < strip.numPixels(); i++ ){
strip.setPixelColor(i, c); // Set a color
strip.show();
delay(10 );
Particle.publish("LetsGo", "sent2");
delay(2000);
}
}
}
Click to Expand
1. I really focused on choosing the correct sensor in the first place. One iteration utilized a Flex-Bend sensor, but it didn't seem to capture the intuitiveness of a squeeze. At the very end, I chose to work with a Force Sensitive Resistor.
2. I started out with a basic circuit that had a single LED light up when pressure was applied to the Flex-Bend Sensor. I then added a IFTTT email trigger (SupBae), as the off-on state of that LED to indicate intention wasn't enough communication to capture the right person's attention. Only someone sitting close (maybe not the person it was intended for!) would notice without the emails.
3. After building the initial circuit with the flex-bend sensor, Professor Daragh helped sort out why my IFTTT applets continued to short-out and why I was getting different nonsensical readings for the flex-bend sensor. A bit of rewiring into the right pins sorted that out quickly. I needed an if-statement to establish the parameters of how much bend would trigger the email.
4. At this point. I switched to the Force Sensitive Resistor and the squeeze/pinch mechanism, added a Neopixel, and included a second email trigger. A certain amount of pressure would activate "SupBae" and an increase would activate "LetsGo'. I wanted a bit more character around the NeoPixel (e.g. color) to indicate the emotional tone of the interaction from the initiator's side. I was constrained to colors that were distinct from one another under the ping pong ball (balloon) - namely bright blue and bright magenta.
VID_20190131_005256 from Chi-Chi Bello on Vimeo.
Ideally in the next iterations;
• the initial state would feature swirl of rainbows instead of white light
• both halves of the couple would have a lamp in their separate spaces
• could acknowledge that an email was received through different balloon color
• alert one another via SMS instead of email
The most difficult part of the project was coming to terms with scoping the project within my own capabilities. I have no coding experience or experience with building circuits and so had to iterate the actual execution before realizing it just wasn't possible within the time constraints and my own abilities. I believe that the end execution was charming and natural than forcing the idea on an object that may not needed to have more "smarts".
Thanks TA Robert and Professor Daragh for sorting through the spaghetti noodle mess which was my breadboard circuits, my jumble of code, and explaining key concepts of the for loop.
https://learn.adafruit.com/adafruit-neopixel-uberguide/the-magic-of-neopixels
https://diotlabs.daraghbyrne.me/docs/working-with-sensors/fsrs/
A hands-on introductory course exploring the Internet of Things and connected product experiences.
"SupBae! - Let's Go!", a tiny lamp (a tiny cat with a balloon) that non-intrusively tells your loved one you are thinking about them and then invites them for an outside adventure.
January 31st, 2019