File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
libraries/02_ADC/examples/AnalogOkuma Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -3,12 +3,17 @@ float adcVolDeg = 0; // Voltaj donusumu icin
33
44void setup () {
55 Serial.begin (115200 ); // Seri haberlesme baslatildi
6- pinMode (A0 , INPUT); // AO pini giris olarak ayarlandi
6+ pinMode (A5 , INPUT); // AO pini giris olarak ayarlandi
77}
88
99void loop () {
10- adcHamVeri = analogRead (A0); // Ham veri okundu
10+ adcHamVeri = analogRead (A5); // Ham veri okundu
11+
12+ #if DENEYAP_KART
1113 adcVolDeg = (adcHamVeri * 3.3 ) / 4095 ; // Voltaj donusumu yapildi
14+ #elif DENEYAP_MINI
15+ adcVolDeg = (adcHamVeri * 3.3 ) / 8191 ; // Voltaj donusumu yapildi
16+ #endif
1217
1318 Serial.printf (" \n ADC ham veri\t : %d\n " , adcHamVeri); // Ham veri seri terminale yazdirildi
1419 Serial.printf (" Voltaj degeri\t : %.2f" , adcVolDeg); // Voltaj degeri seri terminale yazdirildi
You can’t perform that action at this time.
0 commit comments