MMKaresz

Untitled

May 18th, 2021
520
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. String kerdes1, kerdes2;
  2. int a=0, b=0;
  3.  
  4. void setup() {
  5.  
  6.   // Start Serial
  7.   Serial.begin(115200);
  8.   delay(2000);
  9.  
  10.   beallitasok:
  11.  
  12.   a=0;
  13.   Serial.println();Serial.println();
  14.   Serial.println(); Serial.print("Mi a wifi halozat neve? ");
  15.  
  16.   do{
  17.   if (Serial.available()) {
  18.     kerdes1 = Serial.readStringUntil('\n');
  19.     kerdes1.trim();
  20.     delay(100);
  21.     if (kerdes1!=""){Serial.println(kerdes1); a=1;}    
  22.     }} while (a==1);
  23.    
  24.   Serial.println(); Serial.print("Mi a wifi halozat jelszava? ");
  25.  
  26.   do{
  27.   if (Serial.available()) {
  28.     kerdes2 = Serial.readStringUntil('\n');
  29.     kerdes2.trim();
  30.     delay(100);
  31.     if (kerdes2!=""){Serial.println(kerdes2); b=1;}
  32.     }} while (b==1);
  33.  
  34. Serial.println(); Serial.print("Az uj halozat: "); Serial.println(kerdes1);
  35. Serial.print("Az uj halozat jeszava: "); Serial.println(kerdes2);
  36.  
  37.  
  38. void loop() {}
  39.  
RAW Paste Data