---
# System prepended metadata

title: Untitled

---

電路板程式




```
#閃燈
javascript=


#void setup()``
{
  pinMode( D4 , OUTPUT);
}

void loop()
{
  digitalWrite(D4 , LOW);
  delay( 1000 );
  digitalWrite(D4 , HIGH);
  delay( 1000 );
}
}     
```




```
#超音波
javascript=


#include <Ultrasonic2.h>

int Range = 0 ;
Ultrasonic2 monUltrasonic_pin5(5);

void setup()
{
  Serial.begin(9600);
}

void loop()
{
  Range = monUltrasonic_pin5.mesurer(6) ;
  Serial.print("Distance=");
  Serial.print(Range);
  Serial.print(" ");
  Serial.println();
  delay( 200 );
}

```




```javascript=
#蜂鳴器
void setup()
{
}

void loop()
{
  tone(D4, 440);
  delay( 1000 );
  noTone(D4);
}


)