我的代码:
const int buttonPin = 2;
const int ledPin = 13;
void setup() {
pinMode(ledPin, OUTPUT);
pinMode(buttonPin, OUTPUT);
}
void loop() {
digitalRead(ledPin, buttonPin) ? digitalWrite(ledPin, HIGH) : digitalWrite(ledPin, LOW);
}
它给了我这个错误:
processing.app.debug.RunnerException: Board is not selected
at cc.arduino.Compiler.build(Compiler.java:168)
at processing.app.SketchController.build(SketchController.java:647)
at processing.app.SketchController.exportApplet(SketchController.java:672)
at processing.app.Editor$DefaultExportHandler.run(Editor.java:2168)
at java.lang.Thread.run(Thread.java:748)
Board is not selected
它说没有选择电路板,但我选择了电路板/ dev / ttyUSB0。我试过了
usermod -a -G uucp sudo0272
usermod -a -G uucp root
因为当我安装Arduino IDE时,它说是这样做的。问题是什么?如何解决此错误?