我正在新的Raspberry Pi 4上编程我的arduino uno。我已经安装了arduino IDE v1.8.9,但在编译代码时遇到问题。
我收到错误。
avr-g++:错误:设备规格/规格-atmega328p:没有这样的文件或目录
请帮忙。
我正在运行拉斯比安操作系统
/*
AnalogReadSerial
Reads an analog input on pin 0, prints the result to the Serial Monitor.
Graphical representation is available using Serial Plotter (Tools > Serial Plotter menu).
Attach the center pin of a potentiometer to pin A0, and the outside pins to +5V and ground.
This example code is in the public domain.
http://www.arduino.cc/en/Tutorial/AnalogReadSerial
*/
// the setup routine runs once when you press reset:
void setup() {
// initialize serial communication at 9600 bits per second:
Serial.begin(9600);
}
// the loop routine runs over and over again forever:
void loop() {
// read the input on analog pin 0:
int sensorValue = analogRead(A0);
// print out the value you read:
Serial.println(sensorValue);
delay(1); // delay in between reads for stability
}
这是缺少位置 avr 的 arduino-builder 的 -tools 选项。像这样的设置
-工具/主页/所有者/Arduino-1.8.10/硬件/工具/AVR
是查找等级库文件所必需的。将编译输出设置为详细以查看发出的编译命令,并验证上述行是否存在。
更多信息: https://github.com/arduino/arduino-builder/issues/263