在Windows上的Arduino GUI中,如果我单击Sketch - > Import Library,则会在菜单底部显示一个名为"Contributed"的部分.
不幸的是,我错误地点了一下,并添加了一个我不想要的列表.
如何从列表中删除它?
帮助页面仅提到"如果草图不再需要库,只需从代码顶部删除其#include语句",但它没有提到如何从提供的库列表中删除库.
我正在运行Debian 7(Linux Crunchbang),并希望使用Arduino IDE来编程我的Arduino UNO.为此,我安装了包arduino.当我启动Arduino时,我被要求将我的用户添加到该dialout组.所以我做了sudo usermod -a -G dialout <my-username>.
但是,当我arduino在命令行中启动Arduino IDE时,IDE会打开,但我无法将程序加载到Arduino.错误消息是"未找到串行端口COM1.您是否从工具>串行端口菜单中选择了正确的端口?" 当我选择串行端口时,"工具>串行端口"选项显示为灰色.
我以为是因为我没有在我的USB端口(ttyACM0)上授予读写权限.所以我做了,sudo chmod a+rw /dev/ttyACM0但选项仍然是灰色的.
我的 Arduino IDE(Win10 上的 1.8.12 版)在启动时崩溃。运行arduino_debug.exe我收到此错误消息。
C:\Program Files (x86)\Arduino>arduino_debug.exe
Set log4j store directory C:\Users\volke\AppData\Local\Arduino15
Loading configuration...
Initializing packages...
java.lang.NullPointerException
at cc.arduino.contributions.packages.ContributionsIndexer.parseIndex(ContributionsIndexer.java:134)
at processing.app.BaseNoGui.initPackages(BaseNoGui.java:483)
at processing.app.Base.<init>(Base.java:273)
at processing.app.Base.main(Base.java:150)
C:\Program Files (x86)\Arduino>
Run Code Online (Sandbox Code Playgroud)
任何解决方案?我试图删除配置文件package_index.json,package_esp32_index.json但没有任何运气。
关于到期yield()日,Arduino文档在https://www.arduino.cc/en/Reference/Scheduler上解释.显然它是Scheduler库的一部分:
#include <Scheduler.h>
Run Code Online (Sandbox Code Playgroud)
但是,我可以调用yield()我的Nano或ESP8266而不包括Scheduler lib - 但仅限于我的主程序,而不是包含文件.此外,包含不适用于我的非会费.
我错过了yield()什么秘密,或者yield()除了Due之外在Arduino平台上做了什么?
一,问题:
主草图文件:
char foo; // required to clean up some other problems
#include <Arduino.h> // tried it in desperation, no help
#include "a.h"
void setup(){
Serial.begin(9600);
Serial.println("\nTest begins");
for (int num = -1; num < 1; num++){
Serial.print(num);
if (isNegative(num)){
Serial.println(" is negative");
} else {
Serial.println(" is NOT negative");
}
}
}
void loop(){}
Run Code Online (Sandbox Code Playgroud)
//啊
#ifndef H_A
#define H_A
boolean isNegative(int x); // Err#1
int anotherOdity();
#endif // H_A
Run Code Online (Sandbox Code Playgroud)
// a.cpp
#include "a.h"
int isNegative(int x){
Serial.println("I can't print …Run Code Online (Sandbox Code Playgroud) 我正在为Arduino IDE的特定板创建一个库.图书馆工作得很好,现在我退后一步来添加OO.该库是.c和.cpp文件的混合.我知道为了添加类,我只需要使用.cpp.
这是LED.h文件.
https://gist.github.com/SaraJo/182220fda82cbe30255fe95f59d4a6b4
这是LED.cpp文件.
https://gist.github.com/SaraJo/1b3d6967d7bc2ef2e70d79025b755eb9
我得到的错误是:
In file included from /Users/sarachipps/Library/Arduino15/packages/Jewelbots/hardware/nRF51822/1.0.0/cores/JWB_nRF51822/Arduino.h:54:0,
from /Users/sarachipps/Library/Arduino15/packages/Jewelbots/hardware/nRF51822/1.0.0/cores/JWB_nRF51822/ble-nrf51822-master/source/main.c:49:
/Users/sarachipps/Library/Arduino15/packages/Jewelbots/hardware/nRF51822/1.0.0/cores/JWB_nRF51822/LED.h:12:1: error: unknown type name 'class'
class LED {
^
/Users/sarachipps/Library/Arduino15/packages/Jewelbots/hardware/nRF51822/1.0.0/cores/JWB_nRF51822/LED.h:12:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
class LED {
^
exit status 1
Error compiling for board JWB nRF51822(V1.0 32KB).
Run Code Online (Sandbox Code Playgroud)
我猜Arduino将.cpp文件视为.c,是否需要设置编译器标志?谢谢.
我正在尝试使用NOD MCU ESP8266WiFi和Arduino IDE
当我运行此代码时:
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
char auth[] = "YourAuthToken";
char ssid[] = "YourNetworkName";
char pass[] = "YourPassword";
void setup(){
Serial.begin(9600);
Blynk.begin(auth, ssid, pass);
}
void loop()
{
Blynk.run();
}
Run Code Online (Sandbox Code Playgroud)
我收到以下错误:
fatal error: ESP8266WiFi.h: No such file or directory
#include <ESP8266WiFi.h>
^
compilation terminated.
exit status 1
Error compiling for board Arduino/Genuino Uno.
Run Code Online (Sandbox Code Playgroud) 我使用ESP32 DEVKIT 链接和Adafruit VS1053 Codec + MicroSD Breakout - MP3/WAV/MIDI/OGG Play + Record - v4 链接来录制然后播放声音。我正在使用 Arduino IDE 进行编码。
我现在面临一个问题,该模块使用硬件中断来进行播放。但是当我尝试播放音轨时,ESP32 会一次又一次地重置。调试日志显示:
Guru Meditation Error: Core 1 panic'ed (Interrupt wdt timeout on CPU1)
Core 1 register dump:
PC : 0x400d1280 PS : 0x00060834 A0 : 0x800d128f A1 : 0x3ffc0bb0
A2 : 0x3ffc241c A3 : 0x3ffb1f20 A4 : 0x800d1779 A5 : 0x3ffb1f00
A6 : 0x3ffc241c A7 : 0x3f400f9c A8 : 0x800d1280 A9 : 0x3ffc0b90
A10 : 0x0000002b A11 …Run Code Online (Sandbox Code Playgroud) arduino-ide ×10
arduino ×9
c++ ×2
adafruit ×1
arduino-uno ×1
crash ×1
esp32 ×1
esp8266 ×1
header-files ×1
include ×1
macos ×1
robotics ×1
serial-port ×1
windows ×1
windows-10 ×1