Created
October 28, 2019 08:15
-
-
Save RobolinkAkademi/fb853382258d7080483781aa2c172c8e to your computer and use it in GitHub Desktop.
Arduino başlangıç dersleri 5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define Ldr A0 | |
#define led 3 | |
int Isik_siddeti=0; | |
void setup() | |
{ | |
pinMode(led, OUTPUT); | |
} | |
void loop() | |
{ | |
int Ldr_deger = analogRead(Ldr); | |
Isik_siddeti = map(Ldr_deger,0,1023,0,255); | |
analogWrite(led,Isik_siddeti); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment