- void setup() {
- // put your setup code here, to run once:
- Serial.begin(9600);
- }
- void loop() {
- // put your main code here, to run repeatedly:
- int val=0;
- val=analogRead(1);
- Serial.println(val);
- delay(500);
- if(val>200){
- digitalWrite(13,HIGH);
- delay(500);
- digitalWrite(13,LOW);
- delay(500);
- }
- }
デザイン演習Ⅲ・Ⅳトップページ