0

The Hat

This "Smart Hat", which we've dubbed "The Hat" for this project, was designed to relax the chef during his or her moments of “lull” (as monitored by The Signal).

The hat is a bit on the whimsical side. The motor and head massager will be fixed inside a slightly elongated chefs hat. An additional fan will be fixed within the inside of the hat to avoid disturbing any delicate plate presentations the chef might be working on.

Both the fan and the head massager are triggered by biometric indicators of stress (currently a soil moisture sensor) and moments of high workload (triggered by The Signal), which allows for a moment of relief when there is no time to take a break.

0

Input/Output

INPUT: Moments of inactivity (event sent by The Signal)

OUTPUT: Small fan, DC motor powered head massager (with manual override switch)

Bill of Materials

  • 1x Chef hat
  • 1x Metal head scratcher
  • 1x 3D-printed gears and housing
  • 1x Heavy guage wire frame
  • 1x Elastic cotton outer covering
  • 1x Velcro head strap
  • 1x Brushless DC fan
  • 1x Servo
  • 1x Soil monitor
  • 1x On/off switch
  • 1x Particle photon
  • 1x Breadboard and wiring
0
int fanPIN = D0;
int sweatPIN = A0;
int buttonPush = A2;
int servoDelay = 100;
Servo massageServo;
int servoPos = 0;

void setup() {
 Serial.begin(9600);
 massageServo.attach(A5);
 // Set pins to input or output
 //pinMode(pulsePIN, INPUT);
 pinMode(sweatPIN, INPUT);
 pinMode(fanPIN, OUTPUT);
 digitalWrite(fanPIN, LOW);

 Particle.subscribe("cmu/diot2017/breakButtonStart" , buttonHandler);
  //Particle.subscribe("cmu/diot2017/breakButtonEnd" , buttonHandler);
  Particle.subscribe("diot2017/jamiecooldown" , fanHandler);

}

void loop() {
 int buttonState = analogRead(buttonPush);
 Serial.println(buttonState);
 int schweaty = analogRead(A0);
 //Serial.println(schweaty);
 delay(500);


 if (buttonState > 3000){
    digitalWrite(fanPIN, HIGH);
    massageroutine();
    Serial.print("fan on ");
 }else{
   digitalWrite(fanPIN, LOW);



if (schweaty > 3000){
    digitalWrite(fanPIN, HIGH);
}else{
    digitalWrite(fanPIN, LOW);
}
}}



void massageroutine(){
massageServo.write(5);
delay(1200);
massageServo.write(175);
delay(1200);
massageServo.write(5);
delay(1200);
massageServo.write(175);
delay(1200);
massageServo.write(5);
delay(1200);
massageServo.write(175);
delay(1200);
massageServo.write(5);
delay(1200);
massageServo.write(175);
delay(1200);
  }


void buttonHandler(const char *event,const char *data)
{ //this is the handler for receiving the subscribed event
  String apronButtonPushed = data;
  //apronButton = apronButtonPushed.toInt();
  massageroutine();
}

void fanHandler(const char *event,const char *data)
{ //this is the handler for receiving the subscribed event
  Serial.print("recieved event ");
  digitalWrite(fanPIN, HIGH);
  delay(5000);
  digitalWrite(fanPIN, LOW);

}
Click to Expand
0

Circuit


x
Share this Project

Courses

49-713 Designing for the Internet of Things

· 26 members

A hands-on introductory course exploring the Internet of Things and connected product experiences.


About

~

Created

March 5th, 2017