First Commit

This commit is contained in:
MindCreeper03
2025-02-27 19:31:50 +01:00
parent bcbb6aff9a
commit e490df1715
2470 changed files with 1479965 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
//**** INCLUDES *************************************************************
//**** CONSTANTS ************************************************************
//**** PIN ASSIGNMENT OF OUR SHIELD *****************************************
static const int buttonLeft = D7;
static const int buttonRight = D6;
static const int ledBlue = D5;
static const int ledRed = D3;
static const int ldr = A0;
static const int buzzer = 26;
//**** SETUP ****************************************************************
void setup() {
Serial.begin(9600);
pinMode(buttonLeft, INPUT_PULLUP);
pinMode(buttonRight, INPUT_PULLUP);
pinMode(LED_BUILTIN, OUTPUT);
pinMode(ledBlue, OUTPUT);
pinMode(ledRed, OUTPUT);
pinMode(buzzer, OUTPUT);
pinMode(ldr, INPUT);
}
//**** LOOP *****************************************************************
void loop() {
int Brightness = map(analogRead(ldr), 0, 1023, 255, 0);
analogWrite(ledBlue, Brightness);
delay(70);
}