CoffeeMates
Made by Kristie Lord, yxuan and Jonathan Fortis
Made by Kristie Lord, yxuan and Jonathan Fortis
The coffeemates are two coasters designed to help two friends share the experience of drinking coffee together even when they are separated.
Created: October 11th, 2019
Separated by long distances from your loved ones? Missing the simple act of enjoying coffee together after a hard day of work? Fear not, as CoffeeMates can once again allow you to share that intimate moment.
See promotional video of it here: https://vimeo.com/365866298
Next, we decided what components to use and decided on making smart coasters that use a pressure sensor to determine when someone is drinking coffee and lights on the other person's coaster to indicate that. After that, we used a sheet of acrylic to laser cut the coasters, placing the pressure sensor in between the two coasters and the light strip around it.
Next, we needed to figure out how we wanted the neopixel strip to light up. We didn't want the device to be too intrusive, so we decided against blinking lights or animating the lights. Then, we did some research into the meaning of colors, and decided the colors being yellowish brown, green, and pink since those colors were the feelings we were trying to evoke with this device (warmth, calm, soothing, comfort, and optimism). We also thought these colors looked good together and almost like a flower, which evokes a feeling of nature and intimacy since flowers are commonly given to love ones.
After deciding the colors, we coded the neopixel strip to see how the colors looked together and edited the rgb values to get better colors closer to what we imagined.
#include <neopixel.h>
#define PIXEL_PIN D2
#define PIXEL_COUNT 14
#define PIXEL_TYPE WS2812
Adafruit_NeoPixel strip = Adafruit_NeoPixel(PIXEL_COUNT, PIXEL_PIN, PIXEL_TYPE);
void setup() {
strip.begin();
strip.show();
}
void loop() {
for(int i = 0 ; i < strip.numPixels(); i++ ){
if( i % 3 == 0 ){
strip.setPixelColor( i, strip.Color(139,69,19) );
}
else if( i % 3 == 1 ){
strip.setPixelColor( i, strip.Color(0,128,0) );
}
else{
strip.setPixelColor( i, strip.Color(255,192,203) );
}
}
strip.show();
delay(100);
}
Click to Expand
#include <neopixel.h>
#include <stdio.h>
#include <stdlib.h>
#define PIXEL_PIN D2
#define PIXEL_COUNT 14
#define PIXEL_TYPE WS2812
Adafruit_NeoPixel strip = Adafruit_NeoPixel(PIXEL_COUNT, PIXEL_PIN, PIXEL_TYPE);
// Message
char *message;
int mug2 = 0;
// Local Pressure sensing
int FSR_PIN = A0;
int pressure_threshold = 250;
int pressure_reading = 0;
// Local lights
int LED = D7;
void setup() {
Particle.publish("MUGa", "Mug 1 test online");
Particle.subscribe("MUGb", handler);
Particle.variable("mug2", pressure_reading);
pinMode(FSR_PIN, INPUT);
pinMode(LED, OUTPUT);
strip.begin();
strip.show();
}
void loop() {
// local pressure reading
pressure_reading = analogRead(FSR_PIN);
char valtext[1];
sprintf(valtext,"%i", pressure_reading);
Particle.publish("mug 1 weight",valtext);
if (pressure_reading > pressure_threshold){
Particle.publish("MUGa", "1");
}
else {
Particle.publish("MUGa", "0");
}
// Other mug pressure reading
if (mug2 == 1){
digitalWrite(LED,HIGH);
neo_on();
}
else {
neo_off();
digitalWrite(LED,LOW);
}
delay(2000);
}
void handler(const char *event, const char *data){
if(data){
message = const_cast<char*> (data);
mug2 = atoi(message);
}
}
void neo_on(){
for(int i = 0 ; i < strip.numPixels(); i++ ){
if( i % 3 == 0 ){
strip.setPixelColor( i, strip.Color(210,105,30) );
}
else if( i % 3 == 1 ){
strip.setPixelColor( i, strip.Color(0,128,0) );
}
else{
strip.setPixelColor( i, strip.Color(255,104,180) );
}
}
strip.show();
}
void neo_off(){
uint32_t c = strip.Color(0, 0, 0);
for( int i = 0; i < strip.numPixels(); i++ ) {
strip.setPixelColor(i, c); // set a color
strip.show();
}
}
Click to Expand
#include <neopixel.h>
#include <stdio.h>
#include <stdlib.h>
#define PIXEL_PIN D2
#define PIXEL_COUNT 14
#define PIXEL_TYPE WS2812
Adafruit_NeoPixel strip = Adafruit_NeoPixel(PIXEL_COUNT, PIXEL_PIN, PIXEL_TYPE);
// Message
char *message;
int mug1 = 0;
// Local Pressure sensing
int FSR_PIN = A0;
int pressure_threshold = 1300;
int pressure_reading = 0;
// Local lights
int LED = D7;
void setup() {
Particle.publish("MUGb", "Mug 2 test online");
Particle.subscribe("MUGa", handler);
Particle.variable("mug1", pressure_reading);
pinMode(FSR_PIN, INPUT);
pinMode(LED, OUTPUT);
strip.begin();
strip.show();
}
void loop() {
// local pressure reading
pressure_reading = analogRead(FSR_PIN);
char valtext[1];
sprintf(valtext,"%i", pressure_reading);
Particle.publish("mug 2 weight",valtext);
if (pressure_reading > pressure_threshold){
Particle.publish("MUGb", "1");
}
else {
Particle.publish("MUGb", "0");
}
// Other mug pressure reading
if (mug1 == 1){
digitalWrite(LED,HIGH);
neo_on();
}
else {
neo_off();
digitalWrite(LED,LOW);
}
delay(2000);
}
void handler(const char *event, const char *data){
if(data){
message = const_cast<char*> (data);
mug1 = atoi(message);
}
}
void neo_on(){
for(int i = 0 ; i < strip.numPixels(); i++ ){
if( i % 3 == 0 ){
strip.setPixelColor( i, strip.Color(210,105,30) );
}
else if( i % 3 == 1 ){
strip.setPixelColor( i, strip.Color(0,128,0) );
}
else{
strip.setPixelColor( i, strip.Color(255,104,180) );
}
}
strip.show();
}
void neo_off(){
uint32_t c = strip.Color(0, 0, 0);
for( int i = 0; i < strip.numPixels(); i++ ) {
strip.setPixelColor(i, c); // set a color
strip.show();
}
}
Click to Expand
Thermostats, locks, power sockets, and lights are all being imbued with smarts making them increasingly aware and responsive to their environment and users. This course will chart the emergence of ...more
The coffeemates are two coasters designed to help two friends share the experience of drinking coffee together even when they are separated.