hello_led
                Dies ist eine alte Version des Dokuments!
Inhaltsverzeichnis
Hello LED
Quellcode (engl. Sourcecode)
Listing 1:MinimalesProgramm.ino
#include <MeMCore.h>
MeRGBLed led(0, 30);  //  must be fixed!
int PIN_LED = 13 ; // must be fixed!
int LED_LEFT = 1;
int LED_RIGHT = 0;
int wait = 500;
void setup() {
  led.setpin(PIN_LED);
}
void loop() {
  led.setColorAt(LED_LEFT, 255, 0, 0); //Set LED1  to Red
  led.setColorAt(LED_RIGHT, 0, 0, 255); //Set LED0 to Blue
  led.show();
  delay(wait);
  led.setColorAt(LED_LEFT, 255, 255, 255);
  led.setColorAt(LED_RIGHT, 255, 255, 255);
  led.show();
  delay(wait);
}
Beachte 
- Jede Zeile besitzt am Ende ein SEMIKOLON!- Dies gilt nicht für Kontrollstrukturen und Funktionen (aber davon später)
 
- Groß/Kleinschreibung ist wichtig!
Fragen
- Was passiert in der Funktionsetup
- Was ist ein Kommentar?
- Was passiert in der Funktionloop
- Was macht die Funktiondelay
- Welche Parameter erwartet die FunktiondigitalWrite? (Was ist ein Parameter) 
- Was sind Variablen?
Schaltpläne
technischer Schaltplan
Steckbrett
Arduino
hello_led.1738579813.txt.gz · Zuletzt geändert:  von torsten.roehl
                
                


