Page 29 - MDP2022-2
P. 29

delay(2000);
                    digitalWrite(Solenoide_OUTPUT,  LOW);
                }
                /*if  (poto_state  ==  1  &&  flag_sol  ==  1)  {
                    flag_sol  =  0;
                    Serial.println("솔레노이드  OFF");
                    digitalWrite(Solenoide_OUTPUT,  LOW);
                }*/
            }


            //아두이노  우노
            /////////////////////////////////////////////////
            //    사용  CPU  :  uno
            //    날        짜  :
            //    버        전  :  Ver  1.8
            //    작  성  자  :  임승규
            //    컴파일러  :
            //    내        용  :    펀치머신
            //    참        고  :
            //////////////////////////////////////////////////
            #include  <Wire.h>
            #include  <Adafruit_PN532.h>
            #include  <SoftwareSerial.h>
            #include  <DFPlayer_Mini_Mp3.h>


            #define  I2C_address                  0x03    //  I2C주소값
            #define  NFC_SCL                      A4
            #define  NFC_SDA                      A5
            #define  NFC_IRQ                      3
            #define  NFC_RST                      2


            SoftwareSerial  mySerial(10,  11);
            Adafruit_PN532  nfc(NFC_IRQ,  NFC_RST);


            String  hexString  =  "00000000";


            char  uid_1  =  '0',  uid_2  =  '0',  uid_3  =  '0',  uid_4  =  '0',  uid_5  =  '0',  uid_6  =  '0',  uid_7  =  '0',  uid_8  =
            '0';


            int  flag  =  0,  flag_sol  =  0,  angle  =  0;


            void  NFC_init()  {
                uint32_t  versiondata  =  nfc.getFirmwareVersion();
                if  (!  versiondata)  {
                    Serial.print("Didn't  find  PN53x  board");
   24   25   26   27   28   29   30   31   32   33   34