Last active
December 23, 2017 18:45
-
-
Save erenkeskin/e3409dd51e52052324916a5d201086b4 to your computer and use it in GitHub Desktop.
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
if (wifiBaglantisi.find(">")) { // HTML ve Header bilgileri kullanıcıya aktarılıyor | |
wifiBaglantisi.print(Header); | |
wifiBaglantisi.print(HTML); | |
Serial.println(sayfaID); // sayfaID GET methoduyla aldığımız URL'i barındırıyor. | |
// URL Parçalama | |
int ampersand1 = sayfaID.indexOf('&'); | |
int ampersand2 = sayfaID.indexOf('&', ampersand1 + 1); | |
String ilkKisim = sayfaID.substring(0, ampersand1); | |
String ikinciKisim = sayfaID.substring(ampersand1 + 1, ampersand2); | |
String ucuncuKisim = sayfaID.substring(ampersand2 + 1); | |
int esitlik1 = ilkKisim.indexOf('='); | |
int esitlik2 = ikinciKisim.indexOf('='); | |
int esitlik3 = ucuncuKisim.indexOf('='); | |
int kirmiziDeger = ilkKisim.substring(esitlik1 + 1, esitlik1 + 4).toInt(); | |
int yesilDeger = ikinciKisim.substring(esitlik2 + 1, esitlik2 + 4).toInt(); | |
int maviDeger = ucuncuKisim.substring(esitlik3 + 1, esitlik3 + 4).toInt(); | |
// RGB Led'i Yak | |
if((kirmiziDeger) || (yesilDeger) || (maviDeger)){ | |
renkAyarla(kirmiziDeger, yesilDeger, maviDeger); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment