Informatikunterricht

am Gymnasium Kirchenfeld

Benutzer-Werkzeuge

Webseiten-Werkzeuge


arduino:start

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen RevisionVorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
arduino:start [2014/11/15 08:53] rosarduino:start [2014/12/03 07:48] (aktuell) – gelöscht ros
Zeile 1: Zeile 1:
-====== Digitalelektronik mit Arduino ====== 
  
-Workshop an der Fachschaftstagung 2014 
- 
-===== Links ===== 
- 
-==== Arduino ==== 
- 
-  * [[http://arduino.cc/|Arduino]] - Offizielle Website 
-  * [[http://arduino.cc/en/Reference/HomePage|Arduino Reference]] - Sprachreferenz 
- 
-==== Entwicklungsumgebungen (IDEs) ==== 
- 
-  * [[http://arduino.cc/en/Main/Software|Arduino IDE]] - Offizielle IDE (Java) 
-  * [[http://www.visualmicro.com/|VisualMicro]] - Arduino IDE für Microsoft Visual Studio 
-  * [[http://dalpix.com/mariamole|MariaMole]] - Open Source IDE für Arduino (Qt) 
-  * [[http://uecide.org/|UECIDE]] -- Universal Embedded Computing IDE (Java) 
-   
-==== Shops ==== 
- 
-  * [[http://www.play-zone.ch/|Play-Zone.CH]] 
-  * [[https://shop.boxtec.ch/|boxtec]] 
-  * [[http://www.conrad.ch/ce/|Conrad.ch]] 
- 
-<code> 
-const int DATA_PIN = 0; 
-const int SHIFT_CLOCK_PIN = 1; 
-const int STORAGE_CLOCK_PIN = 2; 
- 
-const int MUSTER[] = { 
-    B01111110, 
-    B10000001, 
-    B10101001, 
-    B10000001, 
-    B10000101, 
-    B10111001, 
-    B10000001, 
-    B01111110 
-}; 
- 
-const int DELAY[] = {200, 100, 20, 10, 2, 1}; 
-int DELAY_SIZE = sizeof(DELAY) / sizeof(int); 
- 
-int row = 0; 
-int delayIndex = 0; 
-int changeTime; 
- 
-void setMatrix(byte row, byte col) { 
-    digitalWrite(STORAGE_CLOCK_PIN, LOW); 
-    shiftOut(DATA_PIN, SHIFT_CLOCK_PIN, LSBFIRST, 1 << (7 - row)); 
-    shiftOut(DATA_PIN, SHIFT_CLOCK_PIN, LSBFIRST, col ^ 255); 
-    digitalWrite(STORAGE_CLOCK_PIN, HIGH); 
-} 
- 
-void setup() { 
-    pinMode(DATA_PIN, OUTPUT); 
-    pinMode(SHIFT_CLOCK_PIN, OUTPUT); 
-    pinMode(STORAGE_CLOCK_PIN, OUTPUT); 
-    changeTime = millis() + 5000; 
-} 
- 
-void loop() { 
-    setMatrix(row, MUSTER[row]); 
-    row = (row + 1) % 8; 
-    delay(DELAY[delayIndex]); 
- 
-    if (millis() >= changeTime && delayIndex < DELAY_SIZE-1) { 
-        delayIndex = delayIndex + 1; 
-        changeTime = millis() + 5000; 
-    } 
-} 
-</code> 
arduino/start.1416037990.txt.gz · Zuletzt geändert: 2020/10/13 14:25 (Externe Bearbeitung)