Skills Dev IV: Working with Outputs - Motors and Movement 2022

Made by Ponn Thanasathit

In today's world, mobile phone usage has increased significantly. I'm one of many people that has been spending too much time on my phone, so I decided to create a glanceable reminder of hours spent using my phone. This device relies on a continuous servo and cloud function. The servo speed is determined by how many hours I've used my phone.

Created: November 28th, 2022

0

Outcome

    • This should provide at least one clear illustration of the final outcome (photo or video as appropriate).
  • It should ideally have several supporting images as well as a video demonstrating the working prototype, circuit diagrams, etc.)
  • Add completed code and any supporting documentation and file (and/or a completed zip folder containing all of your source code)
  • a clear overhead (or top-down) photo of your completed circuit

A link to the video:  https://drive.google.com/file/d/19xMGQca7-jpB8Uv84M-jWnh-LN67Tmmi/view?usp=sharing  

0

Process

Describe the process you underwent to reach the outcome (problems encountered, how you resolved them, as well as, experiments, hacks, tests, refinments, iterations, failures)


I decided to work with a continuous servo, which gave me the ability to control the spinning speed. I used tie-dyed artwork as a visual representation. My cloud function took in the number of hours that users have been using their phones and convert that number into servo spinning speed. The more time the user spends on the phone, the quicker the servo spins.

0

Reflection

Reflect on the process of making this project. What did you learn? What would you do differently?

This was a pleasant exercise, I wish I could create a more elaborate movement similar to Google's paper signals.

0
int servoPin = A3;
Servo myServo;
int servoSpeed = 90;


void setup() {

  // attaches the servo on the A3 pin to the servo object
  myServo.attach( A3 );
  
   //Register our Particle to control the servo
   Particle.function("Time spent on your phone (Hour)", servoControl);

  // Keep a cloud variable for the current position
  Particle.variable(  "servoSpeed" , &servoSpeed , INT );  
}

int servoControl(String command)
{
    // Convert
   int newSpeed = command.toInt();
   // Make sure it is in the right range
   // And set the position
   newSpeed   = map(newSpeed,0,8,90,180);
   servoSpeed = constrain(newSpeed, 90 , 180);

   // Set the servo
   myServo.write( servoSpeed );

   // done
   return 1;
}
Click to Expand
0

Link to a recording: https://drive.google.com/file/d/19xMGQca7-jpB8Uv84M-jWnh-LN67Tmmi/view?usp=sharing

x
Share this Project

Courses

About

In today's world, mobile phone usage has increased significantly. I'm one of many people that has been spending too much time on my phone, so I decided to create a glanceable reminder of hours spent using my phone. This device relies on a continuous servo and cloud function. The servo speed is determined by how many hours I've used my phone.