Page 24 - MDP2022-2
P. 24

lcd.setCursor(4,  0);
                            lcd.print("                              ");
                            lcd.setCursor(4,  0);
                            lcd.print(hexString);
                            lcd.setCursor(6,  1);
                            lcd.print("                  ");
                            lcd.setCursor(6,  1);
                            lcd.print(score);


                            String  phpHost  =  "http://"  +  host  +  "/insert_uid.php?uid_value="  +  hexString  +
            "&score="  +  String(score);
                            Serial.print("Connect  to  ");
                            Serial.println(phpHost);
                            http.begin(client,  phpHost);
                            http.setTimeout(1000);
                            int  httpCode  =  http.GET();
                            if  (httpCode  >  0)  {
                                Serial.printf("GET  code  :  %d\n\n",  httpCode);
                                if  (httpCode  ==  HTTP_CODE_OK)  {
                                    Serial.println("값  넣었습니다~");
                                }
                            }
                        }
                        else  {
                            Serial.printf("GET  failed,  error:  %s\n",  http.errorToString(httpCode).c_str());
                        }
                        http.end();
                    }
                }
            }
            void  score_measur()  {
                a  =  digitalRead(Poto_1);
                i  =  digitalRead(Poto_2);


                if  (i  ==  1  &&  temp  ==  0)  {
                    fir_poto  =  micros();
                    Serial.print("1번  포토  인식  :  ");
                    Serial.println(fir_poto);
                    temp  =  1;
                }
                if  (a  ==  0  &&  temp  ==  1)  {
                    digitalWrite(Solenoide,  LOW);


                    temp  =  0;
                    last_poto  =  micros();
   19   20   21   22   23   24   25   26   27   28   29