Page 26 - MDP2022-2
P. 26

pinMode(Poto_2,  INPUT);
                pinMode(Solenoide,  OUTPUT);
                pinMode(mp3,  OUTPUT);


                digitalWrite(mp3,  LOW);
                digitalWrite(Solenoide,  LOW);
                digitalWrite(NFC_re,  HIGH);
                delay(10);


                lcd.init();
                lcd.backlight();
                lcd.setCursor(0,  0);                    //  0번째  줄  0번째  셀부터  입력하게  합니다.
                lcd.print("HEX:");              //  문구를  출력합니다.
                lcd.setCursor(0,  1);
                lcd.print("score:");


                WiFi.mode(WIFI_STA);
                WiFi.begin(ssid,  password);
                while  (WiFi.status()  !=  WL_CONNECTED)  {
                    delay(500);
                    Serial.print(".");
                }
                Serial.println("");
                Serial.print("Connecting  to  ");
                Serial.println(ssid);
                Serial.print("IP  address:  ");
                Serial.println(WiFi.localIP());


                server.begin();
                Serial.println("Server  started");


                Serial.println("동전투입실행");
                while  (!Start_coin)  {
                    flag_1  =  digitalRead(Coin);
                    //Serial.println(flag_1);
                    delay(10);
                    if  (flag_1  ==  1)  {
                        /*while(!temp){
                            int  temp  =  digitalRead(Coin);
                            if(temp  ==  1){
                                Serial.println("응애  나갔음");break;
                            }*/
                        break;
                    }
                }
   21   22   23   24   25   26   27   28   29   30   31