0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

備忘 arduino 割込み

Posted at
void fun();

void setup(){
  Serial.begin(9600);
  pinMode(2,INPUT);
  attachInterrupt(digitalPinToInterrupt(2),fun,RISING);
}

void loop(){
}

void fun(){
  Serial.println(1);
}

attachInterrupt(digitalRead(pin),fun,condition)は非推奨
attachInterrupt(digitalPinToInterrupt(pin),fun,condition)とする

回路は、スイッチを入れると、pin(2)に電圧がかかる、というもの。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?