Demo – 16-223 Work https://courses.ideate.cmu.edu/16-223/f2019/work Introduction to Physical Computing: Student Work Mon, 09 Sep 2019 05:11:27 +0000 en-US hourly 1 https://wordpress.org/?v=5.2.20 Demo 1 – Tushhar Saha https://courses.ideate.cmu.edu/16-223/f2019/work/2019/09/09/demo-1-tushhar-saha/ https://courses.ideate.cmu.edu/16-223/f2019/work/2019/09/09/demo-1-tushhar-saha/#respond Mon, 09 Sep 2019 05:06:30 +0000 https://courses.ideate.cmu.edu/16-223/f2019/work/?p=3682 With some previous experience in Solidworks, I decided to make a system which used the servo motor to rotate anything attached to it. I laser cut attachable wooden pieces. The following picture shows what it looks like:

I designed this so that it could attach to wooden face I laser cut. The servo would be stuck to a rectangular face which acts as base and the servo would be attached to a face above it which would rotate. The measurements were hard to be precise with so the fitting is a bit lose. The following video demonstrates it.

However, I decided to experiment with the mechanism by removing the top face and just letting one face stay. What I found was simple yet amusing, and the first thought that came into my mind was that any child seeing this would appreciate it. I present you the dancing face (switch on sound for a fun rhythm):

The code I was used were simple repititions where I tried to vary the time to create the rhythm in the video.

#include <Servo.h>
Servo hi;

void setup()
{
  hi.attach(9);
}

void loop()
{
  hi.write(0);
  delay(1000);

  hi.write(180);
  delay(1000);

  hi.write(0);
  delay(100);

  hi.write(180);
  delay(100);
  
  hi.write(0);
  delay(500);

  hi.write(180);
  delay(500);
  
  hi.write(0);
  delay(1000);

  hi.write(180);
  delay(1000);

  for (int i=1;i<10;i++){
  hi.write(0);
  delay(100);
  hi.write(180);
  delay(100);
  }

  for (int i=1;i<5;i++){
  hi.write(0);
  delay(500);
  hi.write(180);
  delay(500);
  }

   hi.write(0);
  delay(1000);

  hi.write(180);
  delay(1000);

  hi.write(0);
  delay(100);

  hi.write(180);
  delay(100);
  
  hi.write(0);
  delay(500);

  hi.write(180);
  delay(500);
  
  hi.write(0);
  delay(1000);

  hi.write(180);
  delay(1000);
}
]]>
https://courses.ideate.cmu.edu/16-223/f2019/work/2019/09/09/demo-1-tushhar-saha/feed/ 0