arduino 实验记录 程序 pinMode analogRead digitalRead

pinMode()
pinMode(4,INPUT);
pinMode(6,OUTPUT);//设置端口状态
//-------------------------------
analogRead()
int n = analogRead(A0);  //读取端口A0的状态
//-------------------------------
digitalRead()
int up =digitalRead(4);   //读取端口4的状态


你可能感兴趣的:(arduino,analogRead,pinMode,digitalRead)