Difference between revisions of "T&T Confettinator"
B.Smulders (talk | contribs) |
|||
Line 1: | Line 1: | ||
− | + | ==The Project== | |
− | |||
We knew that our enemy was going build a confetti machine so we had to build a machine against it. We talked about different options like : magnetic field (van de graaf generator), static charge, flamethrower , stickinesss. | We knew that our enemy was going build a confetti machine so we had to build a machine against it. We talked about different options like : magnetic field (van de graaf generator), static charge, flamethrower , stickinesss. | ||
Line 64: | Line 63: | ||
Changes in the code | Changes in the code | ||
+ | <source lang="java"> | ||
/* | /* | ||
Adafruit Arduino - Lesson 13. DC Motor | Adafruit Arduino - Lesson 13. DC Motor | ||
Line 105: | Line 105: | ||
} | } | ||
} | } | ||
+ | </source> | ||
+ | |||
+ | ==Process pictures== | ||
+ | [[File:IMG 7903.JPG|400px]]<br> | ||
+ | [[File:IMG 7904.JPG|400px]]<br> | ||
+ | [[File:IMG 7905.JPG|400px]]<br> | ||
+ | [[File:IMG 7906.JPG|400px]]<br> | ||
+ | [[File:IMG 7908.JPG|400px]]<br> | ||
+ | [[File:IMG 7910.JPG|400px]]<br> | ||
+ | [[File:Foto 06-10-14 10 47 35.jpg|400px]]<br> | ||
+ | [[File:Foto 06-10-14 10 54 12.jpg|400px]]<br> | ||
+ | [[File:Foto 27-10-14 11 20 48.jpg|400px]]<br> | ||
+ | [[File:Foto 27-10-14 11 51 31.jpg|400px]]<br> | ||
+ | [[File:Foto 27-10-14 11 54 32.jpg|400px]]<br> |
Revision as of 05:58, 28 October 2014
The Project
We knew that our enemy was going build a confetti machine so we had to build a machine against it. We talked about different options like : magnetic field (van de graaf generator), static charge, flamethrower , stickinesss.
First we started doing research about the magnetic field but we realized that it wouldn't be possible because it couldn't be close to electric devices. Then we thought about applying sticky material to the wheels that would collect the confetti the most efficient way. We tried to put clothing rollers, different types of tapes to the wheels. We didn't choose to use this as the main function because we wanted to add a more technical approach.
We looked at options and choose to use a ventilator that could blow away the confetti. We wanted to operate the ventilator remotely controlled. We opened the car to see how the electrical part is working. Our car is radio controlled. The transmitter sends a control signal to the receiver using radio waves, which then drives the motor. It has two motors, one in the back to control the speed and one in the front that controls the directions.
We realized that if we would only connect the ventilation to the speed of the car, it wouldn't be efficient because we had to drive fast for a optimum operation. To operate the ventilator from a distance like the car, we wanted to control it separately. We decided to hack a doorbell. We found out after researching all the components separately that the chips looks a lot like the chips of the radio controlled car.
We also attach an external battery to the arduino. The board can operate on an external supply of 6 to 20 volts. The recommended range is 7 to 12 volts. We used 9 V. We connected the + end of your battery to Arduino Vin and the - end to Arduino ground. The green light on the Arduino turned on to indicate that it is powered.
We took an existing code and modified it for our purpose.
original code:
/*
Adafruit Arduino - Lesson 13. DC Motor
*/
int motorPin = 3;
void setup()
{
pinMode(motorPin, OUTPUT);
Serial.begin(9600);
while (! Serial);
Serial.println("Speed 0 to 255");
}
void loop()
{
if (Serial.available())
{
int speed = Serial.parseInt();
if (speed >= 0 && speed <= 255)
{
analogWrite(motorPin, speed);
}
}
}
Midified code:
Changes in the code
/*
Adafruit Arduino - Lesson 13. DC Motor
*/
int motorPin = 3;
int buttonPin = 2;
int led=13;
int speed = 255;
void setup()
{
pinMode(motorPin, OUTPUT);
pinMode(buttonPin, INPUT);
pinMode(led, OUTPUT);
digitalWrite(motorPin, LOW);
//analogWrite(motorPin, speed);
}
void loop()
{
if (digitalRead(buttonPin));
// read the state of the pushbutton value:
int buttonState = digitalRead(buttonPin);
// check if the pushbutton is pressed.
// if it is, the buttonState is HIGH:
if (buttonState == HIGH) {
// turn LED on:
digitalWrite(led, HIGH);
digitalWrite(motorPin, HIGH);
}
else {
// turn LED off:
digitalWrite(led, LOW);
digitalWrite(motorPin, LOW);
}
}