sudo apt-get install arduino
*아래 rxo 는 터미널 rxo@raspberrypi 의 rxo
sudo usermod -a -G tty rxo
sudo usermod -a -G dialout rxo
/etc/sudoers.d/010_pi-nopasswd:1:10: 문법 오류
rxo roni ALL=(ALL) NOPASSWD: ALL
에러 > sudo visudo /etc/sudoers.d/010_pi-nopasswd > 로 들어가서
rxo roni ALL=(ALL) NOPASSWD: ALL 를 rxo ALL=(ALL) NOPASSWD: ALL 로 수정하면 디버깅 완료
다시
sudo usermod -a -G tty rxo
sudo usermod -a -G dialout rxo
실행
포트는 ttyUSB
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(LED_BUILTIN, OUTPUT);
Serial.begin(9600);
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
Serial.println("LED On");
delay(1000); // wait for a second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
Serial.println("LED Off");
delay(1000); // wait for a second
}
디지털13번핀에 led연결 후 업로드 >
시리얼모니터에서 LED ON/OFF 출렦 및 LED 쩜멸 홖인
많은 도움이 되었습니다, 감사합니다.