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

<div  id="slot2"  class="slot"></div>
                                            <div  id="slot3"  class="slot"></div>
                                            <div  class="clear"></div>

                                    </div>
                                    <div  id="result"></div>
                                    <div><button  id="control">Start</button></div>
                            </div>


                    </div>
                    <div  id="test"></div>
                    <script  type="text/javascript">
                    var  state  =  1;
                    setTimeout(function()  {
                                    webiopi().digitalWrite(5,  1);
                                    console.log('1');
                                    setTimeout(function()  {
                                                    webiopi().digitalWrite(5,  0);

                                                    console.log('2');
                                                    setTimeout(function()  {
                                                                    webiopi().digitalWrite(5,  1);
                                                                    console.log('3');
                                                    },  200);
                                    },  200);
                    },  1000);      //페이지  로드  후  1초후에  인터럽트  전송을  위해  GPIO5번핀을  0.2초
            간격으로  1>0>1로  바꿈
                    </script>
            </body>


            </html>





            slot  -  slot.js(슬롯머신구동  javascript  소스)


            /**
            *  Slot  machine
            *  Author:  Saurabh  Odhyan  |  http://odhyan.com
            ** Licensed  under  the  Creative Commons Attribution-ShareAlike License,  Version  3.0  (the
            "License")

            *  You  may  obtain  a  copy  of  the  License  at




                                                         -  410  -
   412   413   414   415   416   417   418   419   420   421   422