User login

Powered by Drupal, an open source content management system

Theory and Practice of Tangible User Interfaces

Motor Paperplane

Submitted by tilman on Wed, 10/15/2008 - 22:32

Assignment: DC Motor: Actuation Assignment 1

Collaborators: tilman, davida

Description

Our idea was to create a paper plane. Thus we installed a propeller at the plane's nose. The speed of the propeller is controlled by a FSR sensor which is built into in the middle part of the plane. So the strength of the grip with which the 'pilot' is holding the plane determines the spin of the propeller.

Componentes Used

  • 1 FSR sensor
  • 1 DC Motor
  • 1 Diode
  • 1 Transistor
  • 2 1.5 volt battery
  • 2 Resistors
  • 1 paper plane made of two sheets of paper
  • Propeller made of cork, duct tape and paper wings
  • Wires

Source Code

/*
* @author: Tilman, David
* A built-in FSR controlls the speed of the plane's propeller
*/

int FSRPin = 5; // select the input pin for the FSR
int motorPin = 9; // select the pin for the propeller
int val = 0; // variable to store the value coming from the sensor
void setup() {
Serial.begin(9600);
}
void loop() {
val = analogRead(FSRPin); // read the value from the sensor, between 0 - 1024
Serial.println(val);
analogWrite(motorPin, val); // analogWrite can be between 0-255
}

Images