Changes

Jump to: navigation, search

User:S8brown

1,720 bytes added, 02:48, 12 June 2009
no edit summary
http://blogHi I'm Seth.makezine.com/archive/2008/03/etchasketch_clock.html?CMP=OTC-0D6B48984890
The For my midterm project , I created a tilt sensing motor.I'm highlighting made two tilt sensors out of ball bearings and bic pens and positioned them on either side of the motor at different angles.When the motor/device is tilted in one direction, it will spin clockwise, and when tilted the "Etch-A-Sketch Clock" and Arduino/Etch-Aother direction, counter-Sketch interfacing in generalclockwise.Originally I'm very interested in wanted to control a toy that would fall over and correct itself, but the Arduino's ability motor it used takes a little more power than I was able to cross over supply directly from the virtual microprocessor, so this might be considered to the physical and the Etch-A-Sketch example shows just thatbe a prototype.Now although I probably won't be using an Etch-A-Sketch As for my projectthe aesthetic of the device, it would be fitted to the use of servo motors seems like something I'd like duty it was designed to incorporateperform such as a handle for a fishing pole, etc.For testing, I've also looked affixed the components to a toilet paper tube with the tilt sensors pointing up a few self-balancing "robots" and those seem to catch my eye, too..little bit so that they won't always be triggering.
----(I let my friend borrow my Arduino, so there aren't any pictures of the "device" as a whole, but here are the main components!)
And I also came across Festo's Aqua Penguin..[[Image:Photo.png]]
http[[Image://wwwPhoto2.youtube.com/watch?v=E8B4_fGopzwpng]]
Could this be based off an Arduino-like system?Maybe.And Here's the code!
Wait...Was int turn1 = 12; // choose the point of this pins for controlling direction <br> int turn2 = 13;<br> int tilt1 = 4; // choose the input pin (for the tilt sensors)<br> int tilt2 = 5;<br> int val1 = 0; // variable for reading the pin status<br> int val2 = 0;<br> void setup() {<br> pinMode(turn1, OUTPUT); // declare turn pins as output<br> pinMode(turn2, OUTPUT);<br> pinMode(tilt1, INPUT); // declare tilt sensors as input<br> pinMode(tilt2, INPUT);<br> digitalWrite(0,HIGH); // write a HIGH to allow for current to learn about all flow through pin<br> digitalWrite(1,HIGH);<br> } void loop(){ val1 = digitalRead(tilt1); // read input value val2 = digitalRead(tilt2); if (val1 == HIGH) { // if tilted, turn the motor! pinMode(turn1,OUTPUT); // turn the pins on pinMode(turn2,OUTPUT); digitalWrite(turn1, LOW); // turn the motor! digitalWrite(turn2, HIGH); } if (val2 == HIGH) { // if tilted, turn the motor! pinMode(turn1,OUTPUT); // turn the pins on pinMode(turn2,OUTPUT); digitalWrite(turn1, HIGH); // turn the amazing things Arduinos could be set up to do?motor the other way! digitalWrite(turn2, LOW);Nooooo... }Couldn if(val1 != HIGH && val2 != HIGH){ // if it't be.s not tilted either way pinMode(turn1,INPUT); // turn the output pins "off" pinMode(turn2,INPUT); } }  [[User:S8brown/Project | Other Projects]]
30
edits

Navigation menu