Commit d965b700 authored by Huguenin-Vuillemin Maïck's avatar Huguenin-Vuillemin Maïck
Browse files

Update doc.

Add SW exercices.
Add Snake SW.
parent bbb0e529
Loading
Loading
Loading
Loading

.vscode/arduino.json

deleted100644 → 0
+0 −8
Original line number Diff line number Diff line
{
    "programmer": "AVR ISP",
    "board": "arduino:megaavr:nona4809",
    "configuration": "mode=off",
    "port": "COM2",
    "sketch": "Console_Kids.ino",
    "output": "./VsCodeArduinoBuilds"
}
 No newline at end of file

.vscode/c_cpp_properties.json

deleted100644 → 0
+0 −568

File deleted.

Preview size limit exceeded, changes collapsed.

.vscode/settings.json

deleted100644 → 0
+0 −6
Original line number Diff line number Diff line
{
    "files.associations": {
        "console_kids.h": "c",
        "arduino.h": "c"
    }
}
 No newline at end of file
+20 −0
Original line number Diff line number Diff line
Solution Mission nr.2: 

const int pinButtonyellow = 4;
const int pinLEDyellow= 2;

void setup() {
    pinMode(pinButtonyellow, INPUT_PULLUP);
    pinMode(pinLEDyellow, OUTPUT);
}

void loop() {
    if (digitalRead(pinButtonyellow) == HIGH) {
        digitalWrite(pinLEDyellow, HIGH);
        delay(500);
        digitalWrite(pinLEDyellow, LOW);
        delay(500);
    } else {
        digitalWrite(pinLEDyllow, LOW);
    }
}
+35 −0
Original line number Diff line number Diff line
Solution mission special nr.2

const int pinButtonyellow = 4;
const int pinLEDyellow = 2;
const int pinButtongreen = A1;
const int pinLEDgreen = 11;

void setup() {
	pinMode(pinButtonyellow, INPUT_PULLUP);
	pinMode(pinLEDyellow, OUTPUT);
	pinMode(pinButtongreen, INPUT_PULLUP);
	pinMode(pinLEDgreen, OUTPUT);
}

void loop() {
	if(digitalRead(pinButtonyellow) == HIGH) {
	digitalWrite(pinLEDyellow, HIGH);
	delay(500);
	digitalWrite(pinLEDyellow, LOW);
        delay(500);
    } else {
        digitalWrite(pinLEDyellow, LOW);
    }

{
	if(digitalRead(pinButtongreen) == HIGH) {
	digitalWrite(pinLEDgreen, HIGH);
	delay(500);
	digitalWrite(pinLEDgreen, LOW);
        delay(500);
    } else {
        digitalWrite(pinLEDgreen, LOW);
    }
}
}
 No newline at end of file
Loading