zoukankan      html  css  js  c++  java
  • Ardunio_Case_3_Homework_traffic_light



    1. int red = 8;  
    2. int yellow = 9;  
    3. int green = 10;   
    4. void setup() {  
    5.   // put your setup code here, to run once:  
    6.   pinMode(red,OUTPUT);  
    7.   pinMode(yellow,OUTPUT);  
    8.   pinMode(green,OUTPUT);  
    9. }  
    10.   
    11. void loop() {  
    12.   // put your main code here, to run repeatedly:  
    13.   digitalWrite(red,HIGH);  
    14.   delay(5000);  
    15.   digitalWrite(red,LOW);  
    16.     
    17.   digitalWrite(yellow,HIGH);  
    18.   delay(2000);  
    19.   digitalWrite(yellow,LOW);  
    20.   
    21.   digitalWrite(green,HIGH);  
    22.   delay(5000);  
    23.   digitalWrite(green,LOW);  
    24.     
    25.   digitalWrite(yellow,HIGH);  
    26.   delay(2000);  
    27.   digitalWrite(yellow,LOW);   
    28. }  

  • 相关阅读:
    iOS基础
    iOS基础
    iOS基础
    iOS基础
    iOS基础
    iOS基础
    iOS基础
    简单DP + 高精
    高精度计算
    树 (tree)
  • 原文地址:https://www.cnblogs.com/Anzhongliu/p/6091864.html
Copyright © 2011-2022 走看看