Page 323 - MDP2022-2
P. 323

if(digitalRead(SEND)  ==  1){  strip_pix_on();}
                if(digitalRead(SEND)  ==  0){
                    if(digitalRead(READ)==0){  digitalWrite(SEND,0);  Serial.println("모터  작동끝");  flag++;  }
                    if(flag==2){  strip_pix_off();  flag  =  0;  Serial.println("네오");}  }


            }

            [  STM  코드  ]
            /*  USER  CODE  BEGIN  Header  */
            /**
                ******************************************************************************
                *  @file                      :  main.c
                *  @brief                    :  Main  program  body
                ******************************************************************************
                *  @attention
                *
                *  <h2><center>©  Copyright  (c)  2022  STMicroelectronics.
                *  All  rights  reserved.</center></h2>
                *
                *  This  software  component  is  licensed  by  ST  under  BSD  3-Clause  license,
                *  the  "License";  You  may  not  use  this  file  except  in  compliance  with  the
                *  License.  You  may  obtain  a  copy  of  the  License  at:
                *                                                opensource.org/licenses/BSD-3-Clause
                *
                ******************************************************************************
                */
            /*  USER  CODE  END  Header  */
            /*  Includes  ------------------------------------------------------------------*/
            #include  "main.h"


            /*  Private  includes  ----------------------------------------------------------*/
            /*  USER  CODE  BEGIN  Includes  */


            /*  USER  CODE  END  Includes  */


            /*  Private  typedef  -----------------------------------------------------------*/
            /*  USER  CODE  BEGIN  PTD  */


            /*  USER  CODE  END  PTD  */

            /*  Private  define  ------------------------------------------------------------*/
            /*  USER  CODE  BEGIN  PD  */
            /*  USER  CODE  END  PD  */


            /*  Private  macro  -------------------------------------------------------------*/
            /*  USER  CODE  BEGIN  PM  */
   318   319   320   321   322   323   324   325   326   327   328