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

Trackable Calorie Deficit Fiddling Tool - MEGR 3171 Group 27

By fiddling with these switches and knobs before weighing yourself, you can easily get into the weight loss and exercise headspace.

BeginnerFull instructions provided8 hours71
Trackable Calorie Deficit Fiddling Tool - MEGR 3171 Group 27

Things used in this project

Hardware components

Photon 2
Particle Photon 2
×2
Breadboard (generic)
Breadboard (generic)
×2
Rotary potentiometer (generic)
Rotary potentiometer (generic)
×2
ELEGOO Electronic Fun Kit Bundle
ELEGOO Electronic Fun Kit Bundle
×2
Jumper wires (generic)
Jumper wires (generic)
×1

Software apps and online services

Particle Build Web IDE
Particle Build Web IDE
YouTube Video

Hand tools and fabrication machines

TinyUSB Library by Adafruit
TinyUSB Library by Adafruit

Story

Read more

Schematics

Flow Chart

How our IOT Project Operates

IOT Project Circuit Diagrams

Diagrams showing what pins are used to connect sensors to the Particle devices.

Potentiometer Circuit (Built)

This is the built circuit of the potentiometer.

Button Circuit (Built)

This is the built circuit for the button sensor.

Potentiometer Data

This is the graph of the potentiometer's data collected over the given time. Data ranges from where the potentiometer is turned to.

Button Data

Graph of button pressing data. High values show no pressing, and low values show output of button being pressed.

Code

Potentiometer Code

C/C++
This code collects the data from the potentiometer.
const int potPin = A0; 

void setup() {
  pinMode(potPin, INPUT);
}

void loop() {
  int sensorValue = analogRead(potPin); 

  Particle.publish("Potentiometer Value", String(sensorValue)); 

    delay(5000);
}

Button Code

C/C++
This code collects the button input data.
int input = 0; // variable created

void setup() {

}

void loop() {
input = analogRead(A0); // reading sensor data

Particle.publish("push", String(input)); // sending data to cloud for analysis

delay(2000); // send data every 2 seconds (maybe too often but its ok)

}

Credits

Edward Schiff
1 project • 0 followers
Contact
Dominick Howe
1 project • 0 followers
Group 27 fr fr
Contact

Comments

Please log in or sign up to comment.