Commits

Jody McAdams  committed 8832b25

renamed file so it would work

  • Participants
  • Parent commits 397eaf2

Comments (0)

Files changed (2)

File Experimental/7SegDisplay/7SegDisplay.ino

-// Arduino 7 segment display example software
-// http://www.hacktronics.com/Tutorials/arduino-and-7-segment-led.html
-// License: http://www.opensource.org/licenses/mit-license.php (Go crazy)
-/* 
-Pins starts from top left
-
-1. Anode F          LED Pin 1        Arduino Pin 8
-2. Anode G          LED Pin 2        Arduino Pin 9
-3. No Pin
-4. Common Cathode
-5. No Pin
-6. Anode E          LED Pin 6        Arduino Pin 7
-7. Anode D          LED Pin 7        Arduino Pin 6
-8. Anode C          LED Pin 8        Arduino Pin 5
-9. Anode RHDP       LED Pin 9        Arduino Pin 10
-10. No Pin
-11. No Pin
-12. Common Cathode  
-13. Anode B         LED Pin 13       Arduino Pin 4
-14. Anode A         LED Pin 14       Arduino Pin 3
-*/
-
-// Define the LED digit patters, from 0 - 9
-// Note that these patterns are for common cathode displays
-// For common anode displays, change the 1's to 0's and 0's to 1's
-// 1 = LED on, 0 = LED off, in this order:
-//                                    Arduino pin: 3,4,5,6,7,8,9,
-byte seven_seg_digits[10][7] = { { 1,1,1,1,1,1,0 },  // = 0
-                                                           { 0,1,1,0,0,0,0 },  // = 1
-                                                           { 1,1,0,1,1,0,1 },  // = 2
-                                                           { 1,1,1,1,0,0,1 },  // = 3
-                                                           { 0,1,1,0,0,1,1 },  // = 4
-                                                           { 1,0,1,1,0,1,1 },  // = 5
-                                                           { 1,0,1,1,1,1,1 },  // = 6
-                                                           { 1,1,1,0,0,0,0 },  // = 7
-                                                           { 1,1,1,1,1,1,1 },  // = 8
-                                                           { 1,1,1,0,0,1,1 }   // = 9
-                                                           };
-
-void setup() {                
-  pinMode(3, OUTPUT);//Anode A
-  pinMode(4, OUTPUT);//Anode B  
-  pinMode(5, OUTPUT);//Anode C
-  pinMode(6, OUTPUT);//Anode D
-  pinMode(7, OUTPUT);//Anode E
-  pinMode(8, OUTPUT);//Anode F
-  pinMode(9, OUTPUT);//Anode G
-  pinMode(10, OUTPUT);//Anode RHDP (right hand decimal place)
-  
-  writeDot(0);  // start with the "dot" off
-}
-
-void writeDot(byte dot) {
-  digitalWrite(10, dot);
-}
-    
-void sevenSegWrite(byte digit) {
-  byte pin = 3;
-  for (byte segCount = 0; segCount < 7; ++segCount) {
-    digitalWrite(pin, seven_seg_digits[digit][segCount]);
-    ++pin;
-  }
-}
-
-void loop() {
-  for (byte count = 10; count > 0; --count) {
-   delay(500);
-   sevenSegWrite(count - 1); 
-  }
-  
-  delay(2000);
-}
-

File Experimental/SevenSegDisplay/SevenSegDisplay.ino

+// Arduino 7 segment display example software
+// http://www.hacktronics.com/Tutorials/arduino-and-7-segment-led.html
+// License: http://www.opensource.org/licenses/mit-license.php (Go crazy)
+/* 
+Pins starts from top left
+
+1. Anode F          LED Pin 1        Arduino Pin 8
+2. Anode G          LED Pin 2        Arduino Pin 9
+3. No Pin
+4. Common Cathode
+5. No Pin
+6. Anode E          LED Pin 6        Arduino Pin 7
+7. Anode D          LED Pin 7        Arduino Pin 6
+8. Anode C          LED Pin 8        Arduino Pin 5
+9. Anode RHDP       LED Pin 9        Arduino Pin 10
+10. No Pin
+11. No Pin
+12. Common Cathode  
+13. Anode B         LED Pin 13       Arduino Pin 4
+14. Anode A         LED Pin 14       Arduino Pin 3
+*/
+
+// Define the LED digit patters, from 0 - 9
+// Note that these patterns are for common cathode displays
+// For common anode displays, change the 1's to 0's and 0's to 1's
+// 1 = LED on, 0 = LED off, in this order:
+//                                    Arduino pin: 3,4,5,6,7,8,9,
+byte seven_seg_digits[10][7] = { { 1,1,1,1,1,1,0 },  // = 0
+                                                           { 0,1,1,0,0,0,0 },  // = 1
+                                                           { 1,1,0,1,1,0,1 },  // = 2
+                                                           { 1,1,1,1,0,0,1 },  // = 3
+                                                           { 0,1,1,0,0,1,1 },  // = 4
+                                                           { 1,0,1,1,0,1,1 },  // = 5
+                                                           { 1,0,1,1,1,1,1 },  // = 6
+                                                           { 1,1,1,0,0,0,0 },  // = 7
+                                                           { 1,1,1,1,1,1,1 },  // = 8
+                                                           { 1,1,1,0,0,1,1 }   // = 9
+                                                           };
+
+void setup() {                
+  pinMode(3, OUTPUT);//Anode A
+  pinMode(4, OUTPUT);//Anode B  
+  pinMode(5, OUTPUT);//Anode C
+  pinMode(6, OUTPUT);//Anode D
+  pinMode(7, OUTPUT);//Anode E
+  pinMode(8, OUTPUT);//Anode F
+  pinMode(9, OUTPUT);//Anode G
+  pinMode(10, OUTPUT);//Anode RHDP (right hand decimal place)
+  
+  writeDot(0);  // start with the "dot" off
+}
+
+void writeDot(byte dot) {
+  digitalWrite(10, dot);
+}
+    
+void sevenSegWrite(byte digit) {
+  byte pin = 3;
+  for (byte segCount = 0; segCount < 7; ++segCount) {
+    digitalWrite(pin, seven_seg_digits[digit][segCount]);
+    ++pin;
+  }
+}
+
+void loop() {
+  for (byte count = 10; count > 0; --count) {
+   delay(500);
+   sevenSegWrite(count - 1); 
+  }
+  
+  delay(2000);
+}