Difference between revisions of "Super Mario on floppy-drive"

From Hackerspace ACKspace
Jump to: navigation, search
(Created page with "__TOC__ == Interfacing the Floppy Drive == Connect the 2nd header of the floppy drive cable to connect to the floppy drive itself. Then, on the end that you normaly connect to ...")
 
Line 1: Line 1:
 
__TOC__
 
__TOC__
  
== Interfacing the Floppy Drive ==
+
== Interfacing the Floppy Drive with Arduino==
  
Connect the 2nd header of the floppy drive cable to connect to the floppy drive itself.
+
Connect the 2nd header of the floppy drive cable to connect to the floppy drive itself.<br>
 
Then, on the end that you normaly connect to your motherboard, find pin 1 (see the red wire)
 
Then, on the end that you normaly connect to your motherboard, find pin 1 (see the red wire)
 +
 +
Connect pin 11 & 12 together.<br>
 +
Connect pins 17 & 19 to ground.<br>
 +
Connect pin 18 to digital 2 on the arduino<br>
 +
Connect pin 20 to digital 3 on the arduino<br>
 +
 +
== Basic Code ==
 +
 +
  void setup()
 +
  {
 +
    pinMode(13, OUTPUT);
 +
    pinMode(2, OUTPUT);
 +
    pinMode(3, OUTPUT);
 +
  }
 +
 +
  void loop()
 +
  {
 +
    reset();
 +
    digitalWrite(2, HIGH);
 +
    delay(20);
 +
    digitalWrite(2, LOW);
 +
  }
 +
 +
  void reset()
 +
  {
 +
    digitalWrite(3, HIGH);
 +
    digitalWrite(2, HIGH);
 +
    digitalWrite(2, LOW);
 +
    digitalWrite(2, HIGH);
 +
    digitalWrite(2, LOW);
 +
    digitalWrite(2, HIGH);
 +
    digitalWrite(2, LOW);
 +
    digitalWrite(2, HIGH);
 +
    digitalWrite(2, LOW);
 +
    digitalWrite(2, HIGH);
 +
    digitalWrite(2, LOW);
 +
    digitalWrite(2, HIGH);
 +
    digitalWrite(2, LOW);
 +
    digitalWrite(2, HIGH);
 +
    digitalWrite(2, LOW);
 +
    digitalWrite(2, HIGH);
 +
    digitalWrite(2, LOW);
 +
    digitalWrite(2, HIGH);
 +
    digitalWrite(2, LOW);
 +
    digitalWrite(2, HIGH);
 +
    digitalWrite(2, LOW);
 +
    digitalWrite(2, HIGH);
 +
    digitalWrite(2, LOW);
 +
    digitalWrite(3, LOW);
 +
  }

Revision as of 22:01, 24 April 2012

Interfacing the Floppy Drive with Arduino

Connect the 2nd header of the floppy drive cable to connect to the floppy drive itself.
Then, on the end that you normaly connect to your motherboard, find pin 1 (see the red wire)

Connect pin 11 & 12 together.
Connect pins 17 & 19 to ground.
Connect pin 18 to digital 2 on the arduino
Connect pin 20 to digital 3 on the arduino

Basic Code

 void setup()
 {
   pinMode(13, OUTPUT);
   pinMode(2, OUTPUT);
   pinMode(3, OUTPUT);
 }
 void loop()
 {
   reset();
   digitalWrite(2, HIGH);
   delay(20);
   digitalWrite(2, LOW);
 }
 void reset()
 {
   digitalWrite(3, HIGH);
   digitalWrite(2, HIGH);
   digitalWrite(2, LOW);
   digitalWrite(2, HIGH);
   digitalWrite(2, LOW);
   digitalWrite(2, HIGH);
   digitalWrite(2, LOW);
   digitalWrite(2, HIGH);
   digitalWrite(2, LOW);
   digitalWrite(2, HIGH);
   digitalWrite(2, LOW);
   digitalWrite(2, HIGH);
   digitalWrite(2, LOW);
   digitalWrite(2, HIGH);
   digitalWrite(2, LOW);
   digitalWrite(2, HIGH);
   digitalWrite(2, LOW);
   digitalWrite(2, HIGH);
   digitalWrite(2, LOW);
   digitalWrite(2, HIGH);
   digitalWrite(2, LOW);
   digitalWrite(2, HIGH);
   digitalWrite(2, LOW);
   digitalWrite(3, LOW);
 }