COLL 142 - Week 09

Lazy Susan with UI

Salvatore "Sal" Testa /@saltesta14

Who is Susan?

Lazy Susan

How will we make a mini Lazy Susan spin?

Motor

Set one wire high and the other low.

Problem

How can we control the spin?

Servo Motor

Wiring

Data, power, ground

Example


#include <Servo.h> // include library
Servo myservo;
int SERVO = P1_7;
void setup() 
{ 
  myservo.attach(SERVO); // set the pin
} 
void loop() {
  myservo.write(180); // default range 0-180 degrees
  delay(1000);
  myservo.write(0);
  delay(1000);
}
                       

What are we doing today?

Finish the Lazy Susan Program

MSP430 code and Processing code

Try out the Inventor's Kit

Begin!