【发布时间】:2018-03-10 14:23:55
【问题描述】:
我正在使用带有 L298n 电机驱动器的 Raspberry Pi Zero 来控制两个电机。我正在使用 Python 脚本测试电机。效果很好。
现在我想使用 Arduino 软件对电机进行编程。我正在关注如何存档的本教程:https://www.youtube.com/watch?v=lZvhtfUlY8Y
然后我将其编码到 Arduino 软件 (v. 1.8.5)
void setup() {
// put your setup code here, to run once:
Console.println("Setup Einstellungen");
pinMode(17, OUTPUT);
delay(500);
Console.println("Setup Einstellungen Ende");
}
void loop() {
Console.println("Rechts Vorwärts");
digitalWrite(17, HIGH);
delay(1000);
digitalWrite(17, LOW);
delay(5000);
}
我使用“导出编译后的二进制文件”编译了文件。我使用 FileZilla 将它上传到 Raspberry 上,并尝试通过 SSH 运行它。
当我尝试运行它时:
(sudo) sketch_feb28.ino.bplus.bin
我收到以下错误:
:-bash:意外标记 `sketch_feb28.ino.bplus.bin' 附近的语法错误
运行file sketch_feb28.ino.bplus.bin
sketch_feb28a.ino.bplus.bin: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SY SV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.2 .0, BuildID[sha1]=a0260345a3700dca64c63fde8a10959214ce9b85, not stripped
我无法单独解决这个问题。
【问题讨论】:
-
你能添加
file sketch_feb28.ino.bplus.bin的结果吗?错误消息看起来像您在此处没有有效的二进制文件 -
你想让我把文件上传到某个地方吗?
-
不,只需运行命令和add the output to the question。
file命令告诉你你有什么类型的文件 -
既然你提到了Putty,你需要在你的树莓派上运行命令,而不是在Windows PC上
-
我已将命令的输出添加到问题中。
标签: arduino raspberry-pi