Basic การใช้บอร์ด Arduino ในการควบคุมไฟ LED กระพริบ

แชร์
ฝัง
  • เผยแพร่เมื่อ 7 ก.พ. 2023

ความคิดเห็น • 1

  • @aueaphumaueawatthanaphisut2895
    @aueaphumaueawatthanaphisut2895  ปีที่แล้ว

    Code:
    int led = 13;
    void setup()
    {
    pinMode(led, OUTPUT);
    }
    void loop()
    {
    // turn the LED on (HIGH is the voltage level)
    digitalWrite(led, HIGH); // HIGH คือเลข 1 จ่ายไฟ +5V.
    delay(1000); // Wait for 1000 millisecond(s)
    // turn the LED off by making the voltage LOW
    digitalWrite(led, LOW); // LOW คือเลข 0V.
    delay(1000); // Wait for 1000 millisecond(s)
    }