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

From Hackerspace ACKspace
Jump to: navigation, search
(Basic Code)
Line 12: Line 12:
  
 
== Basic Code ==
 
== Basic Code ==
 +
 +
'''NO MARIO TUNE YET'''
  
 
   void setup()
 
   void setup()

Revision as of 21:04, 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

NO MARIO TUNE YET

 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);
 }