Page 433 - 완) I MDP 프로젝트 작품 보고서(전체과 1학년)1.6
P. 433

인천전자마이스터고                                                                            전자회로설계과



                                                    m_out  <=  2'b01;
                                                    if  (sen_in  ==  3'b010  ||  sen_in  ==  3'b011)
                                                    begin
                                                            m_out  <=  0;
                                                            end_flag  <=  1;
                                                    end
                                            end
                                    end
                            end
                    end


            endmodule



              나.  라즈베리파이  소스

            #!/usr/bin/env  python
            #  -*-  coding:  utf8  -*-


            import  RPi.GPIO  as  GPIO
            import  MFRC522
            import  signal


            continue_reading  =  True


            #  Capture  SIGINT  for  cleanup  when  the  script  is  aborted
            def  end_read(signal,frame):
                 global  continue_reading
                 print "Ctrl+C captured,  ending  read."
                 continue_reading  =  False
                 GPIO.cleanup()


            #  Hook  the  SIGINT
            signal.signal(signal.SIGINT,  end_read)


            #  Create  an  object  of  the  class  MFRC522
            MIFAREReader  =  MFRC522.MFRC522()


            #  Welcome  message
            print  "Welcome  to  the  MFRC522  data  read  example"
            print  "Press  Ctrl-C  to  stop."





                                                         -  426  -
   428   429   430   431   432   433   434   435   436   437   438