Welcome to Hackster!
Hackster is a community dedicated to learning hardware, from beginner to pro. Join us, it's free!
ashraf_minhaj
Published © GPL3+

Wireless Mood Meter

Express mood easily with a mood meter!

BeginnerFull instructions provided2 hours435
Wireless Mood Meter

Things used in this project

Hardware components

Arduino Nano R3
Arduino Nano R3
×1
SG90 Micro-servo motor
SG90 Micro-servo motor
×1
HC-05 Bluetooth Module
HC-05 Bluetooth Module
×1

Software apps and online services

Arduino IDE
Arduino IDE

Hand tools and fabrication machines

Hot glue gun (generic)
Hot glue gun (generic)

Story

Read more

Schematics

Shematic

Code

Code snippet #1

Plain text
#include<Servo.h>

// declare servo name
Servo meter_servo;

// we'll store input data in this variable
char val;

Code snippet #2

Plain text
void setup()
{
  //initlize the mode of the pins
   meter_servo.attach(9); 
   //set the serial communication rate with bluetooth module
   Serial.begin(9600);
}

Code snippet #5

Plain text
/**** Wireless Mood Meter ***/

/*  author   : Ashraf Minhaj
 *  mail     : ashraf_minhaj@yahoo.com
 *  tutorial : youtube.com/fusebatti
 */

#include<Servo.h>

// declare servo name
Servo meter_servo;

// we'll store input data in this variable
char val;

void setup()
{
  //initlize the mode of the pins
   meter_servo.attach(9); 
   //set the serial communication rate with bluetooth module
   Serial.begin(9600);
}

void loop()
{ 
  while(Serial.available() == 0); //check whether arduino is reciving signal or not
  val = Serial.read() ;           //read data sent over bluetooth

  /********* Happy *********/
  if (val == 'h'){
    meter_servo.write(180);
  }

  /********* Medium Happy ***/
  if (val == 'm'){
    meter_servo.write(130);
  }

  /********* Neutral *******/
  if (val == 'n'){
    meter_servo.write(70);
  }

  /********* Sad *******/
  if (val == 's'){
    meter_servo.write(20);
  }
  
  /********* Angry *******/
  if (val == 'a'){
    meter_servo.write(0);
  }
}

Github

https://github.com/ashraf-minhaj/wireless-mood-meter

Credits

ashraf_minhaj
5 projects • 82 followers
Love to kill Soft things with Python and C++, Hard things with Soldering Iron.
Contact

Comments

Please log in or sign up to comment.