Tất cả những vướng mắt của mình nằm ở đây:
![](http://nw2.upanh.com/b2.s37.d1/7f3c9ab1fcc03ee66c556d7abb127a25_54872012.acm0.png)
Đây là code của mình:
/////////////////////////////////////////////////////////////////
int switchPin=5;
//Setup PinMode
void setup(){
pinMode(switchPin,INPUT_PULLUP);
Serial.begin(9600);//begin communication
}
void loop(){
Serial.println(digitalRead(switchPin));
delay(1000);
}
//////////////////////////////////////////////////////////////////////
Mình thử trên win thì nhận được mức logic 0 1 từ kit, nhưn khi qua Ubuntu dùng Cutcom thì ko được, mình đang vướng ở chỗ ttyACM0
![](http://nw2.upanh.com/b2.s37.d1/7f3c9ab1fcc03ee66c556d7abb127a25_54872012.acm0.png)
Đây là code của mình:
/////////////////////////////////////////////////////////////////
int switchPin=5;
//Setup PinMode
void setup(){
pinMode(switchPin,INPUT_PULLUP);
Serial.begin(9600);//begin communication
}
void loop(){
Serial.println(digitalRead(switchPin));
delay(1000);
}
//////////////////////////////////////////////////////////////////////
Mình thử trên win thì nhận được mức logic 0 1 từ kit, nhưn khi qua Ubuntu dùng Cutcom thì ko được, mình đang vướng ở chỗ ttyACM0
Comment