要問錯誤的朋友 請寄程式碼給我
如果需要購買Arduino的朋友可以來這邊=>推薦 https://s.shopee.tw/1qHQQlYpuE
錯誤處理
注意:如果編譯直行時出現下列訊息,就是電腦與 Arduino 板子無法溝通。
此時需注意下列事項。
- USB 有沒有連接。(看 Arduino 板子上的燈有沒有亮就可以確認這點)
- 有沒有設定 Arduino 的驅動程式。
- 在我的電腦中位在 D:\arduino-1.0\drivers 當中
- 您插入 Arduino 之後會出現新增硬體畫面,此時選擇 D:\arduino-1.0\drivers 資料夾就可以了。
- Arduino Board 的板型是否正確 (選擇 Arduino IDE 功能表中的 Tool/Board 確認板型)
- COM port 設定是否正確。
- 選擇 Arduino IDE 功能表中的 Tool/Serial port 確認 port
- 您可以用裝置管理員看看 (XP 中選 /控制台/系統/硬體/裝置管理員/連接埠/),由於我的 Arduino-UNO 用 USB 模擬為 COM3,因此我在 Tool/Serial port 必須選擇 COM3。
文章標籤
全站熱搜

avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x45 出現這個是什麼問題呢
不要選AVR ISP
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x45 這是甚麼問題呢
不要選AVR ISP
sketch_may23a.ino:42:20: error: invalid suffix "AEB" on integer constant
?
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x44
data.ino:2:71: fatal error: Servo.h : No such file or directory compilation terminated.
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00 avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x00 avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x00 avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x00 avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x00 avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x00 avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x00 avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x00 avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x00 avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00 上傳草稿碼時發生錯誤 This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences.
請問這個是什麼意思?? Arduino:1.8.3 Hourly Build 2017/03/23 09:33 (Windows 10), 開發板:"Arduino/Genuino Uno" c:\users\user\desktop\arduino\arduino-nightly\hardware\tools\avr\bin\../lib/gcc/avr/4.9.2/../../../../avr/bin/ar.exe: unable to rename 'core\core.a'; reason: File exists exit status 1 開發板 Arduino/Genuino Uno 編譯錯誤。
有東西沒有載入吧
請問一下這是甚麼意思? Arduino:1.8.0 (Windows 7), 開發板:"Arduino/Genuino Uno" C:\Users\123\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\cores\arduino\main.cpp: In function 'main': C:\Users\123\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\cores\arduino\main.cpp:51:1: error: unable to find a register to spill in class 'NO_REGS' } ^ C:\Users\123\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\cores\arduino\main.cpp:51:1: error: this is the insn: (insn 581 578 584 41 (set (mem:QI (post_dec:HI (reg/f:HI 32 __SP_L__)) [0 S1 A8]) (subreg:QI (reg/f:HI 401) 1)) C:\Users\123\Desktop\撠?_11Arduino_tcp_sportcar_u1\_11Arduino_tcp_sportcar_u1.ino:133 1 {pushqi1} (expr_list:REG_ARGS_SIZE (const_int 7 [0x7]) (nil))) C:\Users\123\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\cores\arduino\main.cpp:51: confused by earlier errors, bailing out lto-wrapper: C:\Users\123\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.3-arduino2/bin/avr-gcc returned 1 exit status c:/users/123/appdata/local/arduino15/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.3-arduino2/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ld.exe: lto-wrapper failed collect2.exe: error: ld returned 1 exit status exit status 1 開發板 Arduino/Genuino Uno 編譯錯誤。 This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences.
f請問為甚麼出現這個 Arduino:1.8.5 (Windows 7), 開發板:"Arduino Nano, ATmega328P" D:\?憓??冗\?憓??冗\11\11.ino:2:20: fatal error: font.h: No such file or directory compilation terminated. exit status 1 開發板 Arduino Nano 編譯錯誤。 This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences.
怎會亂碼 有用最新版本試看看嗎
Arduino:1.8.3 (Windows 7), 開發板:"Ameba RTL8195A" WARNING: Category 'AmebaArducam' in library AmebaArducam is not valid. Setting to 'Uncategorized' Archiving built core (caching) in: C:\Users\Jackie\AppData\Local\Temp\arduino_cache_406485\core\core_realtek_ameba_ameba_rtl8195a_63a185f82842f83c06c8a87a7ab9e740.a 草稿碼使用了 78521 bytes (3%) 的程式儲存空間。上限為 2097152 bytes。 java.io.IOException: Cannot run program "C:\Users\Jackie\AppData\Local\Arduino15\packages\realtek\tools\ameba_tools\1.0.9/upload_dap.exe": CreateProcess error=2, 系統找不到指定的檔案。 at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048) at processing.app.helpers.ProcessUtils.exec(ProcessUtils.java:26) at cc.arduino.packages.Uploader.executeUploadCommand(Uploader.java:129) at cc.arduino.packages.uploaders.SerialUploader.uploadUsingPreferences(SerialUploader.java:207) at cc.arduino.UploaderUtils.upload(UploaderUtils.java:78) at processing.app.SketchController.upload(SketchController.java:713) at processing.app.SketchController.exportApplet(SketchController.java:686) at processing.app.Editor$DefaultExportHandler.run(Editor.java:2149) at java.lang.Thread.run(Thread.java:748) Caused by: java.io.IOException: CreateProcess error=2, 系統找不到指定的檔案。 at java.lang.ProcessImpl.create(Native Method) at java.lang.ProcessImpl.(ProcessImpl.java:386)
at java.lang.ProcessImpl.start(ProcessImpl.java:137)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
... 8 more
上傳草稿碼時發生錯誤
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
重開一個專案編看看
Arduino:1.8.5 (Windows 10), 開發板:"Arduino/Genuino Uno" 草稿碼使用了 2886 bytes (8%) 的程式儲存空間。上限為 32256 bytes。 全域變數使用了 194 bytes (9%) 的動態記憶體,剩餘 1854 bytes 給區域變數。上限為 2048 bytes 。 上傳草稿碼時發生錯誤 This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences.
你系統是win10嗎? IDE版本是多少 更新到1.6.10版本試看看
System wide configuration file is "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf" Using Port : COM4 Using Programmer : arduino Overriding Baud Rate : 115200 avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x00 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x00 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x00 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x00 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x00 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x00 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x00 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x00 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00 avrdude done. Thank you. 請問怎麼解決
你有選對板子嗎? 參考這篇 https://forum.arduino.cc/index.php?topic=332638.0
Auto_Watering:20: error: 'LiquidCrystal_I2C' does not name a type Auto_Watering.ino: In function 'void setup()': Auto_Watering:168: error: 'class EEPROMClass' has no member named 'update' Auto_Watering:173: error: 'Lcd' was not declared in this scope Auto_Watering.ino: In function 'void loop()': Auto_Watering:309: error: 'class EEPROMClass' has no member named 'update' Auto_Watering:310: error: 'class EEPROMClass' has no member named 'update' Auto_Watering:311: error: 'class EEPROMClass' has no member named 'update' Auto_Watering:312: error: 'class EEPROMClass' has no member named 'update' Auto_Watering:313: error: 'class EEPROMClass' has no member named 'update' Auto_Watering:517: error: 'Lcd' was not declared in this scope Auto_Watering:537: error: 'Lcd' was not declared in this scope Auto_Watering:561: error: 'Lcd' was not declared in this scope Auto_Watering:598: error: 'Lcd' was not declared in this scope Auto_Watering:604: error: 'Lcd' was not declared in this scope Auto_Watering:616: error: 'Lcd' was not declared in this scope Auto_Watering:621: error: 'Lcd' was not declared in this scope Auto_Watering:651: error: 'Lcd' was not declared in this scope Auto_Watering:675: error: 'Lcd' was not declared in this scope Auto_Watering:706: error: 'Lcd' was not declared in this scope Auto_Watering:745: error: 'Lcd' was not declared in this scope Auto_Watering:771: error: 'Lcd' was not declared in this scope Auto_Watering:780: error: 'Lcd' was not declared in this scope Auto_Watering:806: error: 'Lcd' was not declared in this scope Auto_Watering:832: error: 'Lcd' was not declared in this scope Auto_Watering:841: error: 'Lcd' was not declared in this scope Auto_Watering:869: error: 'Lcd' was not declared in this scope Auto_Watering:883: error: 'Lcd' was not declared in this scope Auto_Watering:950: error: 'Lcd' was not declared in this scope Auto_Watering:983: error: 'Lcd' was not declared in this scope 請問怎麼解決
下載 LCD I2C library 加進去 參考 http://anal02.pixnet.net/blog/post/101223261#comment-61817646
In file included from C:\Users\user\Desktop\Auto_Watering\Auto_Watering.ino:4:0: C:\Program Files (x86)\Arduino\libraries\LiquidCrystal_v2/LiquidCrystal_I2C.h: In function 'void setup()': C:\Program Files (x86)\Arduino\libraries\LiquidCrystal_v2/LiquidCrystal_I2C.h:154:9: error: 'int LiquidCrystal_I2C::init()' is private int init(); ^ Auto_Watering:173: error: within this context Lcd.init(); ^ 使用程式庫Wire、版本1.0,位於資料夾:C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire 在資料夾:C:\Program Files (x86)\Arduino\libraries\LiquidCrystal_v2 (legacy) 中使用函式庫 LiquidCrystal_v2 使用程式庫EEPROM、版本2.0,位於資料夾:C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\EEPROM 使用程式庫Servo、版本1.1.2,位於資料夾:C:\Program Files (x86)\Arduino\libraries\Servo exit status 1 within this context 請問這怎麼解決?
請問這個該如何處理 Arduino:1.8.5 (Windows 10), 開發板:"Arduino/Genuino Uno" C:\Users\user\Desktop\sketch_dec24a\sketch_dec24a.ino:1:17: fatal error: dht.h: No such file or directory #include
^
compilation terminated.
exit status 1
開發板 Arduino/Genuino Uno 編譯錯誤。
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
Arduino:1.8.4 (Windows XP), 開發板:"Arduino/Genuino Uno" C:\Documents and Settings\Administrator\My Documents\Downloads\i2cdevlib-master\i2cdevlib-master\Arduino\MPU6050\examples\MPU6050_raw\MPU6050_raw.ino:36:20: fatal error: I2Cdev.h: No such file or directory #include "I2Cdev.h" ^ compilation terminated. exit status 1 開發板 Arduino/Genuino Uno 編譯錯誤。 在C:\Documents and Settings\Administrator\桌面\Arduino\libraries\i2cdevlib-master: C:\Documents and Settings\Administrator\桌面\Arduino\libraries\i2cdevlib-master裡找到無效的程式庫 This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences. 請問這個該怎麼處理???
可能是有函式庫 library檔案沒弄好吧 參考這篇 http://ming-shian.blogspot.tw/2014/05/arduino21mpu6050row-data.html
建置選項已變更,重新建置 Archiving built core (caching) in: C:\Users\user\AppData\Local\Temp\arduino_cache_246533\core\core_arduino_avr_uno_95be0001ba428f960b426f5c86ea770e.a 草稿碼使用了 4512 bytes (13%) 的程式儲存空間。上限為 32256 bytes。 全域變數使用了 460 bytes (22%) 的動態記憶體,剩餘 1588 bytes 給區域變數。上限為 2048 bytes 。 avrdude: ser_open(): can't set com-state for "\\.\COM7" 上傳草稿碼時發生錯誤
不好意思,想請問這是什麼問題? avrdude: verification error, first mismatch at byte 0x0000 0xff != 0x0c avrdude: verification error; content mismatch avrdude: verification error; content mismatch
板子可能壞掉了 弄另一塊是看看 或是你有接LCM或什麼設備嗎?
exit status 1 開發板 Arduino Nano 編譯錯誤。 請問這是甚麼問題呢???
關掉防毒軟體看看
這是甚麼問題 Arduino:1.8.5 (Windows 8.1), 開發板:"Arduino/Genuino Uno" D:\????VoiceLED\VoiceLED.ino:2:22: fatal error: ld3320.h: No such file or directory compilation terminated. exit status 1 開發板 Arduino/Genuino Uno 編譯錯誤。 This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences.
你路徑換成英文路徑看看 都變亂碼了
In file included from D:\My Documents\USER\My Documents\Arduino\libraries\DHT_sensor_library\DHT_U.cpp:22:0: D:\My Documents\USER\My Documents\Arduino\libraries\DHT_sensor_library\DHT_U.h:25:29: fatal error: Adafruit_Sensor.h: No such file or directory #include
^
compilation terminated.
exit status 1
開發板 Arduino/Genuino Uno 編譯錯誤。
要載入濕度感測器的.h檔 可以收尋一下google
sketch_feb20a:3: error: #include expects "FILENAME" or
#include
^
sketch_feb20a:4: error: #include expects "FILENAME" or
#include
^
exit status 1
#include expects "FILENAME" or
這是哪邊的問題阿感謝
試看看前面加入 #include "recip.hpp" 或是 include " XXX" 改成 <XXXX>
Arduino:1.8.5 (Windows 10), 開發板:"Arduino/Genuino Uno" C:\Users\User\AppData\Local\Temp\arduino_modified_sketch_55431\sketch_mar19b.ino:1:28: fatal error: softwareserial.h: No such file or directory #include
^
compilation terminated.
exit status 1
開發板 Arduino/Genuino Uno 編譯錯誤。
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
請問這是什麼問題
請問願意一對一輔導Arduino的相關技術嗎? 願意付費的,在學習過程中碰到不少問題, 急需請求支援. 可以用email進一步聯繫: zlyu@ms28.hinet.net 感恩!!
hi您好 有什麼能幫助您的 email如下 jingluenwork @ gmail.com
編譯找到多個程式庫怎麼解決
可能lib有重複到
int In_pin_Do = 10; int In_pin_Re = 9; int In_pin_Mi = 8; int In_pin_Fa = 7; int In_pin_So = 6; int In_pin_La = 5; int In_pin_Si = 4; int In_pin_DoH = 3; int Out_pin_Phone = 2; int val; int tempo = 200; int Do = 1915; int Re = 1700; int Mi = 1519; int Fa = 1432; int So = 1275; int La = 1136; int Si = 1014; int DoH = 956; void setup() { Serial.begin(9600); pinMode(Out_pin_Phone,OUTPUT); } void loop() { val = digitalRead(In_pin_Do); if(val == 1){playTone(Do,tempo); Serial.println(“Do”);} val = digitalRead(In_pin_Re); if(val == 1){playTone(Re,tempo); Serial.println(“Re”);} val = digitalRead(In_pin_Mi); if(val == 1){playTone(Mi,tempo); Serial.println(“Mi”);} val = digitalRead(In_pin_Fa); if(val == 1){playTone(Fa,tempo); Serial.println(“Fa”);} val = digitalRead(In_pin_So); if(val == 1){playTone(So,tempo); Serial.println(“So”);} val = digitalRead(In_pin_La); if(val == 1){playTone(La,tempo); Serial.println(“La”);} val = digitalRead(In_pin_Si); if(val == 1){playTone(Si,tempo); Serial.println(“Si”);} val = digitalRead(In_pin_DoH); if(val == 1){playTone(DoH,tempo); Serial.println(“DoH”);} } void playTone(int tone,int duration) { for(long i = 0; i2018-06-05 17:42 
JL8051 2018-06-07 14:23
你的一些符號 都變成"全行"囉 改回半形就正常了 如果需要給我信箱 我寄給你, 或寄我信箱 jingluenwork@ gmail.com 通知我 (信箱內有空格部分 請砍掉) 還有 delayMicroseconds(音); 這是錯誤的哦 這是要做延遲時間嗎?
Arduino:1.8.4 (Windows 7), 開發板:"Arduino/Genuino Uno" sketch_may30a:2: error: #include expects "FILENAME" or
#include
^
sketch_may30a:3: error: #include expects "FILENAME" or
#include
^
exit status 1
#include expects "FILENAME" or
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
一直出現這個 開發板 Arduino/Genuino Uno 編譯錯誤。 如何解決,感謝
C:\Users\E330\Desktop\sketch_jul05b\sketch_jul05b.ino:3:50: fatal error: C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/SoftwareSerial.h>MeTemperatur: Invalid argument #includeMeTemperature myTemp 4
^
compilation terminated.
exit status 1
開發板 Arduino/Genuino Uno 編譯錯誤
這是我去make block的官網抄的程式中出現的錯誤,
大大可以幫我解讀一下嗎?
我用的是 IDE1.8.5
板子是ArduinoUno
1.檢查你lib有沒有放錯 尤其是SoftwareSerial.h 這個lib 2.檢查你編譯器有沒有選擇UNO 版本 謝謝
請問我用溫度感測器測得的溫度應該怎麼用hc05傳送到手機?
手機要跟hc05做連線 ,手機要寫APP接收
請問 可以用藍芽傳送變數嗎?
你可以的 可以 可以用送資料
那請問 語法應該怎麼寫呢 因為我才國中 剛接觸文字編程 以前都用積木 如:scratch等 所以很多都還不會
你可以找一本arduino的書來看 先有個概念 會比較好上手
謝謝您^^ 我一定會達成目標的
C:\Users\E330\Desktop\real_porject\real_porject.ino: In function 'void loop()': real_porject:53: error: 'else' without a previous 'if' else ^ exit status 1 'else' without a previous 'if' 這是ide顯示的錯誤,錯誤部分是這部分 if((sensors.getTempCByIndex(0)) < BT.read()) ; { //繼電器off } else { //繼電器on } 請問到底哪裡出錯了?
if((sensors.getTempCByIndex(0)) < BT.read()) ; 這段後面不用加分號 if((sensors.getTempCByIndex(0)) < BT.read()) 這樣 if((sensors.getTempCByIndex(0)) < BT.read()) { //繼電器off } else { //繼電器ON }
請問要怎麼在 if( < ) 後面放入變數?
ˋ這裡錯在哪? if((sensors.getTempCByIndex(0)) < scanf("%d", int a )) 錯誤代碼: C:\Users\E330\Desktop\real_porject\real_porject.ino: In function 'void loop()': real_porject:53: error: expected primary-expression before 'int' if((sensors.getTempCByIndex(0)) < scanf("%d", int a )) ^ exit status 1 expected primary-expression before 'int'
應該是 int a; if(sensors.getTempCByIndex(0) < a)
avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0xf0 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0xf0 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0xf0 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0xf0 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0xf0 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0xf0 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0xf0 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0xf0 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0xf0 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0xf0 上傳到板子時發生問題。可行建議請見http://www.arduino.cc/en/Guide/Troubleshooting#upload
請問你的arduino 型號有選對嗎?
我的板子一直無法讓我上傳,確定有下載驅動程式也確定有連接到正確的連接埠,編譯完成後就是無法上傳,想請問發生了什麼問題0.0 以下為錯誤代碼 草稿碼使用了 930 bytes (2%) 的程式存儲空間。最大值為 32,256 bytes。 全域變數使用了 9 bytes (0%) 的動態記憶體,剩餘 2,039 bytes 供局部變數。最大值為 2,048 bytes 。 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0xfb avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0xfb avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0xfb avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0xfb avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0xfb avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0xfb avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0xfb avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0xfb avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0xfb avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0xfb 上傳到板子時發生問題。可行建議請見http://www.arduino.cc/en/Guide/Troubleshooting#upload。
哈囉 這問題有可能是你板子選擇沒有選正確哦 假設你arduino是uno版本 要去(下圖)這邊選正確 http://lh5.ggpht.com/-oKmRPOMGj9A/UKJi4hcwVuI/AAAAAAAAJUo/wRrLOJw1vFk/image_thumb.png?imgmax=800 還有任何問題可以寄信問我 jingluenwork@ gmail.com
Arduino:1.8.5 (Windows 10), 開發板:"Arduino/Genuino Uno" 建置選項已變更,重新建置 草稿碼使用了 10538 bytes (32%) 的程式儲存空間。上限為 32256 bytes。 全域變數使用了 691 bytes (33%) 的動態記憶體,剩餘 1357 bytes 給區域變數。上限為 2048 bytes 。 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x27 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x27 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x27 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x27 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x27 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x27 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x27 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x27 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x27 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x27 上傳到板子時發生問題。可行建議請見http://www.arduino.cc/en/Guide/Troubleshooting#upload。 This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences.
請問以下錯誤碼 Failed to load C:\Users\怡境\Desktop\Particle Sensor Project\arduino-1.8.4\lib\theme\buttons.svg: null Enclosed Exception: 尾端段落中不允許內容。 想請問這是甚麼意思?新手上路
有完整的程式碼?寄來jingluenwork@ gmail.com
Arduino:1.8.7 (Windows 10), 開發板:"NodeMCU 0.9 (ESP-12 Module), 80 MHz, Flash, 4M (1M SPIFFS), v2 Lower Memory, Disabled, None, Only Sketch, 115200" 建置選項已變更,重新建置 xtensa-lx106-elf-g++: error: CreateProcess: No such file or directory exit status 1 開發板 NodeMCU 0.9 (ESP-12 Module) 編譯錯誤。 This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences. 怎麼辦???
請問你是用ESP8266的wifi? 可能是library沒有裝喔 方便寄整個專案來嗎? jingluenwork@ gmail.com
Arduino:1.8.8 (Windows 10), 開發板:"Generic ESP8266 Module, 80 MHz, ck, 26 MHz, 40MHz, QIO, 512K (no SPIFFS), v2 Prebuilt (MSS=536), Disabled, None, 115200" 未知的板子generic(平台esp8266,套件esp8266) 開發板 Generic ESP8266 Module 編譯錯誤。 This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences. 請問這個事怎麼回事 安裝失敗嗎?
Arduino:1.8.5 (Windows 10), 開發板:"Arduino/Genuino Uno" C:\Users\CTWENG~1\AppData\Local\Temp\arduino_modified_sketch_826909\HW_1211_Yowkon_LED.ino:1:22: fatal error: IRremote.h: No such file or directory #include
^
compilation terminated.
exit status 1
開發板 Arduino/Genuino Uno 編譯錯誤。
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
fatal error: IRremote.h: No such file or directory 沒有加到這個.h檔哦
Arduino:1.8.8 (Windows 10), 開發板:"Arduino Nano, ATmega328P" 草稿碼使用了 3558 bytes (11%) 的程式儲存空間。上限為 30720 bytes。 全域變數使用了 66 bytes (3%) 的動態記憶體,剩餘 1982 bytes 給區域變數。上限為 2048 bytes 。 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0xe2 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0xe2 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0xe2 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0xe2 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0xe2 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0xe2 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0xe2 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0xe2 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0xe2 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0xe2 上傳到板子時發生問題。可行建議請見http://www.arduino.cc/en/Guide/Troubleshooting#upload。 This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences.
請問你板子上有插東西嗎? 先把他拔下來 然後再上傳一次
Arduino:1.8.6 (Windows 10), 開發板:"Arduino Nano, ATmega328P" 草稿碼使用了 3376 bytes (10%) 的程式儲存空間。上限為 30720 bytes。 全域變數使用了 229 bytes (11%) 的動態記憶體,剩餘 1819 bytes 給區域變數。上限為 2048 bytes 。 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x8b avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x8b avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x8b avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x8b avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x8b avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x8b avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x8b avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x8b avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x8b avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x8b 上傳到板子時發生問題。可行建議請見http://www.arduino.cc/en/Guide/Troubleshooting#upload。 This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences. 跟樓上一樣問題 nano版都沒插東西
確認一下comport有沒有正確 arduino 跟電腦顯示的(去裝置管理員看)
COM也是對的
Arduino:1.8.8 (Windows Store 1.8.19.0) (Windows 10), 開發板:"Arduino/Genuino Uno" 建置選項已變更,重新建置 C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.19.0_x86__mdqgnx93n4wtt\hardware\arduino\avr\cores\arduino\HardwareSerial.cpp: In member function 'availableForWrite': C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.19.0_x86__mdqgnx93n4wtt\hardware\arduino\avr\cores\arduino\HardwareSerial.cpp:203:1: internal compiler error: Segmentation fault } ^ Please submit a full bug report, with preprocessed source if appropriate. See for instructions.
lto-wrapper.exe: fatal error: C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.19.0_x86__mdqgnx93n4wtt\hardware\tools\avr/bin/avr-gcc returned 1 exit status
compilation terminated.
c:/program files/windowsapps/arduinollc.arduinoide_1.8.19.0_x86__mdqgnx93n4wtt/hardware/tools/avr/bin/../lib/gcc/avr/5.4.0/../../../../avr/bin/ld.exe: error: lto-wrapper failed
collect2.exe: error: ld returned 1 exit status
exit status 1
開發板 Arduino/Genuino Uno 編譯錯誤。
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
請問這個是哪裡錯誤
請問為什麼會這樣? "Servo.h"找到多個程式庫 已使用: C:\Users\User\Documents\Arduino\libraries\Servo 未使用: C:\Users\User\Documents\Arduino\libraries\evive exec: "C:\\Program Files\\kodorobot\\Transformer\\arduino\\tools-builder\\ctags\\5.8-arduino11/ctags": file does not exist 開發板 Arduino/Genuino Uno 編譯錯誤。
請問為何會這樣呢?謝謝 Arduino:1.8.5 (Windows 10), 開發板:"NodeMCU 1.0 (ESP-12E Module), 80 MHz, Flash, 4M (1M SPIFFS), v2 Lower Memory, Disabled, None, Only Sketch, 115200" Archiving built core (caching) in: C:\Users\88698\AppData\Local\Temp\arduino_cache_77674\core\core_esp8266_esp8266_nodemcuv2_CpuFrequency_80,VTable_flash,FlashSize_4M1M,LwIPVariant_v2mss536,Debug_Disabled,DebugLevel_None____,FlashErase_none,UploadSpeed_115200_c2cbba38122dabb75e26b2551f76ade1.a 草稿碼使用了 255108 bytes (24%) 的程式儲存空間。上限為 1044464 bytes。 全域變數使用了 28452 bytes (34%) 的動態記憶體,剩餘 53468 bytes 給區域變數。上限為 81920 bytes 。 warning: espcomm_sync failed error: espcomm_open failed error: espcomm_upload_mem failed error: espcomm_upload_mem failed This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences.
Arduino:1.8.8 (Windows 10), 開發板:linkit one C:\Windows\system32>"C:\Users\benso\OneDrive\文件\ArduinoData\packages\LinkIt\tools\linkit_tools\1.1.23\PushTool.exe" -d arduino -c -p "C:\Users\benso\AppData\Local\Temp\arduino_build_682490/Blink.ino.vxp" 其中" -d arduino -c -p"是麼意思呢??非常感謝
Arduino:1.8.8 (Windows Store 1.8.19.0) (Windows 10), 開發板:"Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)" sketch\ultralcd_st7920_u8glib_rrd.h: In function '__base_ctor .constprop': sketch\ultralcd_st7920_u8glib_rrd.h:191:104: internal compiler error: Segmentation fault U8GLIB_ST7920_128X64_RRD(uint8_t dummy) : U8GLIB(&u8g_dev_st7920_128x64_rrd_sw_spi) { UNUSED(dummy); } ^ Please submit a full bug report, with preprocessed source if appropriate. See for instructions.
lto-wrapper.exe: fatal error: C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.19.0_x86__mdqgnx93n4wtt\hardware\tools\avr/bin/avr-gcc returned 1 exit status
compilation terminated.
c:/program files/windowsapps/arduinollc.arduinoide_1.8.19.0_x86__mdqgnx93n4wtt/hardware/tools/avr/bin/../lib/gcc/avr/5.4.0/../../../../avr/bin/ld.exe: error: lto-wrapper failed
collect2.exe: error: ld returned 1 exit status
exit status 1
開發板 Arduino/Genuino Mega or Mega 2560 編譯錯誤。
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
請問這是甚麼原因呢?
RTL 8195 板子 燒入範例(BLINK) 出現 ERR: Cannot find ameba on mbed driver! Please re-plug Ameba. 序列埠以及開發版設定都已弄好
更新FW吧 看這篇 https://www.amebaiot.com/change-dap-firmware/
大大你好!請問這要怎麼解決 "Servo.h"找到多個程式庫 已使用: C:\Users\User\Documents\Arduino\libraries\Servo 未使用: C:\Users\User\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0\libraries\ESP32 未使用: C:\Program Files (x86)\Arduino\libraries\Servo exit status 1 開發板 ESP32 Dev Module 編譯錯誤。
程式碼能寄給我 jingluenwork @ gmail.com (去除空格)
老師您好: 本人目前使用DHT22這個感測器,使用的基板為Ameba RTL8195,程式碼為ARDUINO內建DHT程式碼。 目前DHT22已在UNO版上測試是可以獲得數據的,但在RTL8195上總是顯示Failed to read from DHT sensor!,目前查詢很多資料,已知是晶片問題,但發現一篇跟我一樣是同樣的基板以及感測器跟程式碼,但他的卻可以執行,請問是為什麼?有什麼可以解決的辦法嗎? 資料來源:https://vmaker.tw/archives/21957
確認感測器的接腳 UNO和 RTL8195 可能會不同腳位 在程式上要做修改 ex UNO 程式碼寫pin2是data腳 , RTL8195定義為pin10 若套用到RTL8195 當然讀不到資料... 最後跟你確認一下 UNO 和RTL8195是用同一份程式?
回復#54 是的,腳位設定已經調整過,程式碼都是使用內建DHT程式碼
redefinition of 'int fade_val' 我出現的錯誤 我在製作https://blog.xuite.net/tuvalu/arduino/209287418-%E8%81%B2%E9%9F%B3%E5%81%B5%E6%B8%AC+%2B+RGB+LED%E7%87%88這個時 程式一直無法成功的寫入
In file included from C:\Users\user\Documents\Arduino\libraries\U8g2-2.25.10\src/U8x8lib.h:45:0, from C:\Users\user\Documents\Arduino\libraries\U8g2-2.25.10\src/U8g2lib.h:50, from C:\Users\user\Desktop\123\123.ino:16: C:\Users\user\Documents\Arduino\libraries\U8g2-2.25.10\src/clib/u8x8.h:123:1: error: expected initializer before 'extern' extern "C" { ^ In file included from c:\users\user\appdata\local\arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1\arm-none-eabi\include\c++\4.8.3\new:40:0, from c:\users\user\appdata\local\arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1\arm-none-eabi\include\c++\4.8.3\ext\new_allocator.h:33, from c:\users\user\appdata\local\arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1\arm-none-eabi\include\c++\4.8.3\arm-none-eabi\armv7e-m\fpu\bits\c++allocator.h:33, from c:\users\user\appdata\local\arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1\arm-none-eabi\include\c++\4.8.3\bits\allocator.h:46, from c:\users\user\appdata\local\arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1\arm-none-eabi\include\c++\4.8.3\bits\stl_tree.h:62, from c:\users\user\appdata\local\arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1\arm-none-eabi\include\c++\4.8.3\set:60, from C:\Users\user\AppData\Local\Arduino15\packages\LinkIt\hardware\linkit_rtos\0.10.21\libraries\LWiFi\src/WiFiServer.h:25, from C:\Users\user\AppData\Local\Arduino15\packages\LinkIt\hardware\linkit_rtos\0.10.21\libraries\LWiFi\src/LWiFi.h:31, from C:\Users\user\Desktop\123\123.ino:23: c:\users\user\appdata\local\arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1\arm-none-eabi\include\c++\4.8.3\exception:35:37: error: expected declaration before end of line #pragma GCC visibility push(default) ^ exit status 1 開發板 LinkIt 7697 編譯錯誤。 你好這是甚麼問題呢?
拜託一下 PO這麼長的錯誤不給程式碼 是要怎麼跟你說錯誤阿 ???
使用3米長的WS2812B燈條到一半突然出現這個錯誤 avrdude: ser_open(): can't set com-state for "\\.\com3",之後拔掉重插又沒出現這個了,之後檢查連接阜和UNO板子本身應該是沒問題(板子有跑過examples的blink,是可以上傳的),但是再也沒辦法跑code和驅動燈條了,想請問可能是哪裡出錯了? 這裡附上程式碼: #include
#define NUM_LEDS 72
#define DATA_PIN 6
CRGB leds[NUM_LEDS];
void setup() {
Serial.begin(9600);
FastLED.addLeds(leds, NUM_LEDS);
}
void loop() {
fill_solid( &leds[0], 9, CRGB(10, 10, 10));
FastLED.show();
delay(2000);
fill_solid( &leds[0], 9, CRGB(0, 0, 0));
FastLED.show();
delay(1000);
exit(0);
}
重開機看看吧 可能是comport短路 電腦法起保護把comport關閉了
不好意思 Arduino:1.8.9 (Windows 7), 開發板:"Arduino Nano, ATmega328P" 草稿碼使用了 4562 bytes (14%) 的程式儲存空間。上限為 30720 bytes。 全域變數使用了 301 bytes (14%) 的動態記憶體,剩餘 1747 bytes 給區域變數。上限為 2048 bytes 。 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x28 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x28 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x28 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x28 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x28 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x28 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x28 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x28 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x28 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x28 上傳到板子時發生問題。可行建議請見http://www.arduino.cc/en/Guide/Troubleshooting#upload。 This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences.
bootloader重燒吧
Arduino:1.8.9 (Windows 10), 開發板:"Arduino Leonardo" In file included from C:\Users\acer\Desktop\JoystickTest-20190530T102222Z-001\JoystickTest\JoystickTest.ino:1:0: C:\Users\acer\Documents\Arduino\libraries\drive-download-20190530T102101Z-001/Joystick.h:24:35: fatal error: DynamicHID/DynamicHID.h: No such file or directory compilation terminated. exit status 1 開發板 Arduino Leonardo 編譯錯誤。 This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences.
DynamicHID 這個.h沒有加入 給code吧 給我錯誤我也看不出啥
avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x32 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x32 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x32 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x32 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x32 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x32 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x32 上傳到板子時發生問題。可行建議請見http://www.arduino.cc/en/Guide/Troubleshooting#upload。 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x32 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x32 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x32
Tone.cpp.o (symbol from plugin): In function `timer0_pin_port': (.text+0x0): multiple definition of `__vector_7' C:\Users\����\AppData\Local\Temp\arduino_build_768458\libraries\IRremote\IRremote.cpp.o (symbol from plugin):(.text+0x0): first defined here collect2.exe: error: ld returned 1 exit status exit status 1 開發板 Arduino/Genuino Uno 編譯錯誤。
Q: 無法上傳程式至Arduino Nano,error message如下.麻煩解救!! Arduino: 1.8.9 (Windows 10), Board: "Arduino Nano, ATmega328P" Sketch uses 930 bytes (3%) of program storage space. Maximum is 30720 bytes. Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes. avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x0f avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x0f avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x0f avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x0f avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x0f avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x0f avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x0f avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x0f avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x0f avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x0f Problem uploading to board. See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions. This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences.
#include
#include
#define DHTPIN 7
DHT dht(DHTPIN, DHTTYPE); //Initialize DHT sensor
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#define OLED_RESET 4
Adafruit_SSD1306 display(OLED_RESET);
#define LOGO16_GLCD_HEIGHT 16
#define LOGO16_GLCD_WIDTH 16
static const unsigned char PROGMEM logo16_glcd_bmp[] =
{ B00000000, B11000000,
B00000001, B11000000,
B00000001, B11000000,
B00000011, B11100000,
B11110011, B11100000,
B11111110, B11111000,
B01111110, B11111111,
B00110011, B10011111,
B00011111, B11111100,
B00001101, B01110000,
B00011011, B10100000,
B00111111, B11100000,
B00111111, B11110000,
B01111100, B11110000,
B01110000, B01110000,
B00000000, B00110000 };
#if (SSD1306_LCDHEIGHT != 32)
#error("Height incorrect, please fix Adafruit_SSD1306.h!");
#endif
Bounce bouncer1 = Bounce(2, 50);
Bounce bouncer2 = Bounce(3, 50);
Bounce bouncer3 = Bounce(4, 50);
Bounce bouncer4 = Bounce(5, 50);
static int ledStatus = LOW;
Bounce bouncer5 = Bounce(6, 50);
void setup() {
Serial.begin(9600);
pinMode(2, INPUT);
pinMode(3, INPUT);
pinMode(4, INPUT);
pinMode(5, INPUT);
pinMode(13, OUTPUT);
pinMode(6, INPUT);
dht.begin(); //啟動DHT
display.clearDisplay();
}
void loop() {
if(bouncer1.update() == true && bouncer1.read() == HIGH) {
int counts=7;
display.setTextSize(2); //设置字体大小
display.setTextColor(WHITE); //设置字体颜色白色
display.setCursor(0,0); //设置字体的起始位置
display.println("Green"); //输出字符并换行
display.setTextSize(2);
display.setCursor(0,20); //設置文字位置
display.print("Day:");
display.setTextSize(2); //设置字体大小 //输出文字
display.setTextColor(BLACK, WHITE); //设置字体黑色,字体背景白色
display.setCursor(60,20);
display.println(counts); //
delay(86400000);
counts--;
if(counts==0)
counts=0;
}
else if(bouncer2.update() == true && bouncer2.read() == HIGH) {
int counts=9;
display.setTextSize(2); //设置字体大小
display.setTextColor(WHITE); //设置字体颜色白色
display.setCursor(0,0); //设置字体的起始位置
display.println("Yellow"); //输出字符并换行
display.setTextSize(2);
display.setCursor(0,20); //設置文字位置
display.print("Day:");
display.setTextSize(2); //设置字体大小 //输出文字
display.setTextColor(BLACK, WHITE); //设置字体黑色,字体背景白色
display.setCursor(60,20);
display.println(counts); //
delay(86400000);
counts--;
if(counts==0)
counts=0;
}
else if(bouncer3.update() == true && bouncer3.read() == HIGH) {
int counts=6;
display.setTextSize(2); //设置字体大小
display.setTextColor(WHITE); //设置字体颜色白色
display.setCursor(0,0); //设置字体的起始位置
display.println("Black"); //输出字符并换行
display.setTextSize(2);
display.setCursor(0,20); //設置文字位置
display.print("Day:");
display.setTextSize(2); //设置字体大小 //输出文字
display.setTextColor(BLACK, WHITE); //设置字体黑色,字体背景白色
display.setCursor(60,20);
display.println(counts); //
delay(86400000);
counts--;
if(counts==0)
counts=0;
}
else if(bouncer4.update() == true && bouncer4.read() == HIGH) {
ledStatus = ledStatus == HIGH ? LOW : HIGH;
digitalWrite(13, ledStatus);
}
else if(bouncer5.update() == true && bouncer5.read() == HIGH) {
delay(2000); //每2秒鐘更新一次
float h = dht.readHumidity(); //讀取濕度
float t = dht.readTemperature(); //讀取攝氏溫度
float f = dht.readTemperature(true); //讀取華氏溫度
if (isnan(h) || isnan(t) || isnan(f)) {
display.println("無法從DHT模組讀取資料!");
return;
display.setTextSize(2); //设置字体大小
display.setTextColor(WHITE); //设置字体颜色白色
display.setCursor(0,0); //设置字体的起始位置
display.print("Humidity: "); //输出字符并换行
display.setTextSize(2);
display.setTextColor(BLACK, WHITE);
display.setCursor(60,0); //設置文字位置
display.print(h);
display.println(" %\t");
display.setTextSize(2); //设置字体大小
display.setTextColor(WHITE); //设置字体颜色白色
display.setCursor(0,20); //设置字体的起始位置
display.print("Temperature: "); //输出字符并换行
display.setTextSize(2);
display.setTextColor(BLACK, WHITE);
display.setCursor(60,20); //設置文字位置
display.print(t);
display.println(" *C ");
display.setTextSize(2);
display.setTextColor(BLACK, WHITE);
display.setCursor(60,40); //設置文字位置
display.print(f);
display.println(" *F\t");
}
}
麻煩解救
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00 avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x00 avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x00 avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x00 avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x00 avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x00 avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x00 avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x00 avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x00 avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
Tools => Processor並選擇“ATmega328P(舊版本)
Arduino:1.8.9 (Windows 10), 開發板:"LinkIt 7697" "I2Cdev.h"找到多個程式庫 In file included from C:\Users\YTS\Documents\Arduino\libraries\Grove_IMU_9DOF\MPU6050.cpp:37:0: 已使用: C:\Users\YTS\Documents\Arduino\libraries\Grove_IMU_9DOF C:\Users\YTS\Documents\Arduino\libraries\Grove_IMU_9DOF\MPU6050.h:41:26: fatal error: avr/pgmspace.h: No such file or directory 未使用: C:\Users\YTS\AppData\Local\Arduino15\packages\LinkIt\hardware\linkit_rtos\0.10.21\libraries\IMU_10DOF-master #include
未使用: C:\Users\YTS\AppData\Local\Arduino15\packages\LinkIt\hardware\linkit_rtos\0.10.21\libraries\IMU_10DOF-master
^
未使用: C:\Users\YTS\AppData\Local\Arduino15\packages\LinkIt\hardware\linkit_rtos\0.10.21\libraries\IMU_10DOF-master
compilation terminated.
未使用: C:\Users\YTS\AppData\Local\Arduino15\packages\LinkIt\hardware\linkit_rtos\0.10.21\libraries\IMU_10DOF-master
exit status 1
開發板 LinkIt 7697 編譯錯誤。
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
Arduino:1.8.9 (Mac OS X), 開發板:"Arduino Nano, ATmega328P (Old Bootloader)" 草稿碼使用了 928 bytes (3%) 的程式儲存空間。上限為 30720 bytes。 全域變數使用了 9 bytes (0%) 的動態記憶體,剩餘 2039 bytes 給區域變數。上限為 2048 bytes 。 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x00 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x00 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x00 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x00 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x00 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x00 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x00 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x00 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00 上傳到板子時發生問題。可行建議請見http://www.arduino.cc/en/Guide/Troubleshooting#upload。 This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences.
avrdude: ser_open(): can't set com-state for "\\.\COM4" 上傳草稿碼時發生錯誤 一直出現這個,怎麼解決?
USB重新再插一次 或是你COM4被占用 ,調整comport就可以解決
Arduino:1.8.9 (Windows 7), 開發板:"Arduino/Genuino Uno" 草稿碼使用了 2528 bytes (7%) 的程式儲存空間。上限為 32256 bytes。 全域變數使用了 52 bytes (2%) 的動態記憶體,剩餘 1996 bytes 給區域變數。上限為 2048 bytes 。 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x7e avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x7e avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x7e avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x7e avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x7e avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x7e avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x7e avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x7e avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x7e avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x7e 上傳到板子時發生問題。可行建議請見http://www.arduino.cc/en/Guide/Troubleshooting#upload。 This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences.
Arduino:1.8.9 (Windows 10), 開發板:"Arduino/Genuino Uno" sketch_sep05a:6:54: error: 'POSITIVE' was not declared in this scope LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE); ^ exit status 1 'POSITIVE' was not declared in this scope This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences.
Arduino:1.8.7 (Windows 7), 開發板:"Arduino Nano, ATmega328P (Old Bootloader)" libraries\HCMAX7219-master\HCMAX7219.cpp.o (symbol from plugin): In function `HCMAX7219::print7Seg(char*, unsigned int)': (.text+0x0): multiple definition of `HCMAX7219::print7Seg(char*, unsigned int)' libraries\HCMAX7219-master\HCMAX7219 (2).cpp.o (symbol from plugin):(.text+0x0): first defined here libraries\HCMAX7219-master\HCMAX7219.cpp.o (symbol from plugin): In function `HCMAX7219::print7Seg(char*, unsigned int)': (.text+0x0): multiple definition of `HCMAX7219::print7Seg(long, unsigned int)' libraries\HCMAX7219-master\HCMAX7219 (2).cpp.o (symbol from plugin):(.text+0x0): first defined here libraries\HCMAX7219-master\HCMAX7219.cpp.o (symbol from plugin): In function `HCMAX7219::print7Seg(char*, unsigned int)': (.text+0x0): multiple definition of `HCMAX7219::print7Seg(long, unsigned char, unsigned int)' libraries\HCMAX7219-master\HCMAX7219 (2).cpp.o (symbol from plugin):(.text+0x0): first defined here libraries\HCMAX7219-master\HCMAX7219.cpp.o (symbol from plugin): In function `HCMAX7219::print7Seg(char*, unsigned int)': (.text+0x0): multiple definition of `HCMAX7219::printMatrix(char*, unsigned int)' libraries\HCMAX7219-master\HCMAX7219 (2).cpp.o (symbol from plugin):(.text+0x0): first defined here libraries\HCMAX7219-master\HCMAX7219.cpp.o (symbol from plugin): In function `HCMAX7219::print7Seg(char*, unsigned int)': (.text+0x0): multiple definition of `HCMAX7219::printMatrix(long, unsigned int)' libraries\HCMAX7219-master\HCMAX7219 (2).cpp.o (symbol from plugin):(.text+0x0): first defined here libraries\HCMAX7219-master\HCMAX7219.cpp.o (symbol from plugin): In function `HCMAX7219::print7Seg(char*, unsigned int)': (.text+0x0): multiple definition of `HCMAX7219::printMatrix(long, unsigned char, unsigned int)' libraries\HCMAX7219-master\HCMAX7219 (2).cpp.o (symbol from plugin):(.text+0x0): first defined here libraries\HCMAX7219-master\HCMAX7219.cpp.o (symbol from plugin): In function `HCMAX7219::print7Seg(char*, unsigned int)': (.text+0x0): multiple definition of `HCMAX7219::CalCharIndex(int)' libraries\HCMAX7219-master\HCMAX7219 (2).cpp.o (symbol from plugin):(.text+0x0): first defined here libraries\HCMAX7219-master\HCMAX7219.cpp.o (symbol from plugin): In function `HCMAX7219::print7Seg(char*, unsigned int)': (.text+0x0): multiple definition of `HCMAX7219::Invert(unsigned char)' libraries\HCMAX7219-master\HCMAX7219 (2).cpp.o (symbol from plugin):(.text+0x0): first defined here libraries\HCMAX7219-master\HCMAX7219.cpp.o (symbol from plugin): In function `HCMAX7219::print7Seg(char*, unsigned int)': (.text+0x0): multiple definition of `HCMAX7219::Clear()' libraries\HCMAX7219-master\HCMAX7219 (2).cpp.o (symbol from plugin):(.text+0x0): first defined here libraries\HCMAX7219-master\HCMAX7219.cpp.o (symbol from plugin): In function `HCMAX7219::print7Seg(char*, unsigned int)': (.text+0x0): multiple definition of `HCMAX7219::Write(unsigned char, unsigned char, unsigned char)' libraries\HCMAX7219-master\HCMAX7219 (2).cpp.o (symbol from plugin):(.text+0x0): first defined here libraries\HCMAX7219-master\HCMAX7219.cpp.o (symbol from plugin): In function `HCMAX7219::print7Seg(char*, unsigned int)': (.text+0x0): multiple definition of `HCMAX7219::Shutdown(bool, unsigned char)' libraries\HCMAX7219-master\HCMAX7219 (2).cpp.o (symbol from plugin):(.text+0x0): first defined here libraries\HCMAX7219-master\HCMAX7219.cpp.o (symbol from plugin): In function `HCMAX7219::print7Seg(char*, unsigned int)': (.text+0x0): multiple definition of `HCMAX7219::TestMode(bool, unsigned char)' libraries\HCMAX7219-master\HCMAX7219 (2).cpp.o (symbol from plugin):(.text+0x0): first defined here libraries\HCMAX7219-master\HCMAX7219.cpp.o (symbol from plugin): In function `HCMAX7219::print7Seg(char*, unsigned int)': (.text+0x0): multiple definition of `HCMAX7219::SevenSegDigits(unsigned char, unsigned char)' libraries\HCMAX7219-master\HCMAX7219 (2).cpp.o (symbol from plugin):(.text+0x0): first defined here libraries\HCMAX7219-master\HCMAX7219.cpp.o (symbol from plugin): In function `HCMAX7219::print7Seg(char*, unsigned int)': (.text+0x0): multiple definition of `HCMAX7219::Intensity(unsigned char, unsigned char)' libraries\HCMAX7219-master\HCMAX7219 (2).cpp.o (symbol from plugin):(.text+0x0): first defined here libraries\HCMAX7219-master\HCMAX7219.cpp.o (symbol from plugin): In function `HCMAX7219::print7Seg(char*, unsigned int)': (.text+0x0): multiple definition of `HCMAX7219::Refresh()' libraries\HCMAX7219-master\HCMAX7219 (2).cpp.o (symbol from plugin):(.text+0x0): first defined here libraries\HCMAX7219-master\HCMAX7219.cpp.o (symbol from plugin): In function `HCMAX7219::print7Seg(char*, unsigned int)': (.text+0x0): multiple definition of `HCMAX7219::Init()' libraries\HCMAX7219-master\HCMAX7219 (2).cpp.o (symbol from plugin):(.text+0x0): first defined here libraries\HCMAX7219-master\HCMAX7219.cpp.o (symbol from plugin): In function `HCMAX7219::print7Seg(char*, unsigned int)': (.text+0x0): multiple definition of `HCMAX7219::HCMAX7219(unsigned char)' libraries\HCMAX7219-master\HCMAX7219 (2).cpp.o (symbol from plugin):(.text+0x0): first defined here libraries\HCMAX7219-master\HCMAX7219.cpp.o (symbol from plugin): In function `HCMAX7219::print7Seg(char*, unsigned int)': (.text+0x0): multiple definition of `HCMAX7219::HCMAX7219(unsigned char)' libraries\HCMAX7219-master\HCMAX7219 (2).cpp.o (symbol from plugin):(.text+0x0): first defined here collect2.exe: error: ld returned 1 exit status exit status 1 開發板 Arduino Nano 編譯錯誤。 This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences.
Arduino:1.8.10 (Windows 7), 開發板:"Arduino Nano, ATmega328P (Old Bootloader)" project_734_code_file_5849150:31:10: error: HCMAX7219.h: No such file or directory #include
^~~~~~~~~~~~~
compilation terminated.
exit status 1
HCMAX7219.h: No such file or directory
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
沒有裝lib https://www.rootopen.com/git/5cffbaafb107d723b435c717
Arduino:1.8.10 (Windows 10), 開發板:"ESP32 Wrover Module, Huge APP (3MB No OTA/1MB SPIFFS), QIO, 80MHz, 921600, None" In file included from C:\Users\zhu\AppData\Local\Temp\arduino_modified_sketch_159769\CameraWebServer.ino:15:0: camera_pins.h:98:2: error: #error "Camera model not selected" #error "Camera model not selected" ^ "WiFi.h"找到多個程式庫 已使用: C:\Users\zhu\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\libraries\WiFi 未使用: D:\arduino-1.8.10\libraries\WiFi exit status 1 #error "Camera model not selected" This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences.
sketch_oct20a:1:10: error: LiquidCrystal_I2C.h: No such file or directory #include
^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
exit status 1
LiquidCrystal_I2C.h: No such file or directory
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
請問這是什麼呢? 謝謝
(1)抓 LiquidCrystal_I2C.zip 到這 http://hmario.home.xs4all.nl/arduino/LiquidCrystal_I2C/ 或是直接點以下抓: http://hmario.home.xs4all.nl/arduino/LiquidCrystal_I2C/LiquidCrystal_I2C.zip (2)在 Arduino IDE 點 Sketch > Import Library... > Add Library... 然後選到你的 LiquidCrystal_I2C.zip (3)或是也可手動安裝這庫, 比較麻煩一點點 導入庫後需要重新启动一下Arduino~
請問Music_Reactive_RGB_Led:1:21: error: FastLED.h: No such file or directory compilation terminated. exit status 1 FastLED.h: No such file or directory 它說找無目錄 這個錯誤該怎麼處理??
Arduino:1.8.10 (Windows 10), 開發板:"Arduino/Genuino Uno" 草稿碼使用了 892 bytes (2%) 的程式儲存空間。上限為 32256 bytes。 全域變數使用了 9 bytes (0%) 的動態記憶體,剩餘 2039 bytes 給區域變數。上限為 2048 bytes 。 上傳草稿碼時發生錯誤 This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences. 這是怎樣?
需下載以下函式庫並放入Arduino程式庫中 https://github.com/adafruit/Adafruit_Sensor 成式庫名稱為 Adafruit_Sensor-master 以上程式庫也是官版1.3.0程式庫所額外需要的程式庫,下載之後放到Arduino程式庫目錄中, 就能解決1.3.0版編譯的問題。
草稿碼使用了 8308 bytes (27%) 的程式儲存空間。上限為 30720 bytes。 全域變數使用了 728 bytes (35%) 的動態記憶體,剩餘 1320 bytes 給區域變數。上限為 2048 bytes 。 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x76 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x76 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x76 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x76 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x76 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x76 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x76 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x76 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x76 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x76 請問這該怎麼解決?
Arduino:1.8.9 (Windows 10), 開發板:"Arduino/Genuino Uno" In file included from C:\Users\xubpc\OneDrive\Documents\Arduino\libraries\DHT_sensor_library\DHT_U.cpp:15:0: C:\Users\xubpc\OneDrive\Documents\Arduino\libraries\DHT_sensor_library\DHT_U.h:36:29: fatal error: Adafruit_Sensor.h: No such file or directory compilation terminated. exit status 1 開發板 Arduino/Genuino Uno 編譯錯誤。 This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences.
#include //使用DHT函式庫。
#include //使用LiquidCrystal_I2C函式庫。
LiquidCrystal_I2C lcd(0x27,16,2); //設定I2C 16x2LCD位址為0x27。
#include //使用SoftwareSerial函式庫。
SoftwareSerial ESP8266(3,4); //設定D3為RXD,D4為TXD連接ESP826。
#define DHTPIN 2 //DHT11輸出連接至D2。
#define DHTTYPE DHT11 //溫度感測器型號為DHT11。
DHT dht(DHTPIN, DHTTYPE); //宣告dht型態變數。
#define SSID "Bowei" //輸入AP名稱。
#define PASSWD "05040504" //輸入AP密碼。
const int led=9; //led連接至D9。
boolean ledStatus=0; //led狀態。
const int WIFIled=13; //WIFI狀態指示燈。
boolean FAIL_8266 = false; //ESP8266 連線狀態。
int connectionId; //多路連接通道號碼。
char c; //通道號碼。
String cmd; //AT命令。
String action; //回傳給用戶端的數據。
int ipcount=0; //私用IP的長度。
int plus=0; //CIFSR指令的回應數據起始碼'+'數量。
unsigned long realtime=0; //每10秒更新溫度及濕度。
String temp,humi; //目前環境溫度及濕度。
char buf[3]; //緩衝區。
//初值設定
void setup() {
lcd.init(); //LCD初始化。
lcd.backlight(); //開啟LCD背光。
lcd.setCursor(0,0); //設定顯示座標在第0行第0列。
pinMode(led,OUTPUT); //設定D9為輸出埠。
digitalWrite(led,LOW); //關閉照明LED燈。
pinMode(WIFIled,OUTPUT); //設定D13為輸出埠。
digitalWrite(WIFIled,LOW); //關閉WIFI指示燈。
ESP8266.begin(9600); //設定ESP8266傳輸速率為9600bps。
for(int i=0;i<3;i++); //WIFI指示燈閃爍3次。
{
digitalWrite(WIFIled,HIGH);
delay(200);
digitalWrite(WIFIled,LOW);
delay(200);
}
do{
sendESP8266cmd("AT+RST",2000); //重置ESP8266。
lcd.clear(); //清除LCD螢幕。
lcdprintStr("reset 8266..."); //顯示"reset 8266..."訊息。
if(ESP8266.find("OK")) //ESP8266重置成功?
{
lcdprintStr("OK"); //ESP8266 重置成功,顯示"OK"訊息。
if(connectWiFi(10)) //ESP8266與Wifi連線成功?
{
FALL_8266=false; //重置ESP8266成功。
lcd.setCursor(0,1); //設定顯示座標在第0行第1列。
lcdprinStr("connect success");//顯示連線成功訊息。
}
else //連線不成功。
{
FAIL_8266=true;
lcd.setCursor(0,1);
lcdprinStr("connect fail");//顯示"connect fail"訊息。
}
}
else //ESP8266重置失敗。
{
delay(500); //延遲0.5秒。
FAIL_8266=true; //連線失敗。
lcd.setCursor(0,1); //設定顯示座標在第0行第1列。
lcdprinStr("no response"); //顯示"no response"訊息。
}
}while(FAIL_8266); //連線失敗則重複連線。
digitalWrite(WIFIled,HIGH); //連線成功則WIFI指示燈亮。
}
//主迴圈
void loop() {
if((millis()-realtime)>=10000) //每10秒更新溫度值。
{
realtime=millis(); //處存目前系統時間。
lcd.setCursor(0,1); //設定顯示座標在第0行第1列。
for(int i=0;i<16;i++); //清除第一列資料。
lcd.print(' ');
if(!FAIL_8266) //ESP8266 已連線?
{
float t = dht.readTemperature(); //讀取溫度值。
float h = dht.readHumidity(); //讀取濕度值。
if (isnan(t) || isnan(h) ) //沒有正確讀取到溫濕度值。
{
lcd.setCursor(0,1); //設定顯示座標在第0行第1列。
lcdprinStr("DHT11 error"); //顯示"DHT11 error"訊息。
}
else //正確讀取到溫度值。
{
lcd.setCursor(0,1); //設定顯示座標在第0行第1列。
lcdprinStr("T="); //顯示"T="訊息。
lcd.print((int)t/10); //顯示溫度值的十位數。
lcd.print((int)t%10); //顯示溫度值的個位數。
lcd.write(0xdf); //顯示"度"。
lcd.print('C'); //顯示"C"。
buf[0]=0x30+(int)t/10;
buf[1]=0x30+(int)t%10;
temp=(String(buf)).substring(0,2);//將度值轉成字串。
lcd.setCursor(8,1); //設定顯示座標在第8行第1列。
lcdprinStr("H="); //顯示"H="訊息。
lcd.print((int)h/10); //顯示濕度值的十位數。
lcd.print((int)h%10); //顯示濕度值的個位數。
lcd.print('%'); //顯示"%"。
buf[0]=0x30+(int)h/10;
buf[1]=0x30+(int)h%10;
humi=(String(buf)).substring(0,2);//將濕度值轉成字串。
}
}
}
if(ESP8266.available()) //ESP8266以接收到字元?
{
if(ESP8266.find("+IPD,")) //接收到"+IPD,"?
{
while((c=ESP8266.read())<'0'||c>='9'); //略過非0~9數字。
connectionId = c-'0'; //儲存通道號碼。
ESP8266.find("X="); //接收到"X="字串?
while((c=ESP8266.read())<'0'||c>='9'); //略過非0~9數字。
if(c=='1') //接收到用戶端傳送"X=1"數據?
{
ledStatus=!ledStatus; //改變照明LED燈狀態
if(ledStatus==0)
action="X1=off";
else
action="X1=on";
digitalWrite(led,ledStatus);
}
else if(c=='2')
action=temp +","+ humi;
httpResponse(connectionId,action);
}
}
}
//ESP8266 AT指令傳送函數
void sendESP8266cmd(String cmd, int waitTime)
{
ESP8266.println(cmd);
delay(waitTime);
}
//連線函數
boolean connectWiFi(int timeout)
{
sendESP8266cmd("AT+CWMODE=1",2000);
delay(1000);
lcd.setCursor(0,1);
lcdprintStr("WiFi mode:STA");
do{
String cmd="AT+CWJAP=\"";
cmd+=SSID;
cmd+="\",\"";
cmd+=PASSWD;
cmd+="\"";
sendESP8266cmd(cmd,1000);
lcd.clear();
lcdprinStr("join AP...");
if(ESP8266.find("OK"))
{
lcdprintStr("OK");
sendESP8266cmd("AT+CIFSR",1000);
lcd.clear();
plus=0;
ipcount=0;
while(ESP8266.available())
{
c=ESP8266.read();
if(c=='+')
plus++;
else if(c>='0' && c<='9' && ipcount<=12 && plus<=2)
{
lcd.write(c);
ipcount++;
}
else if(c=='.' && ipcount<=12 && plus<=2)
lcd.write(c);
}
sendESP8266cmd("AT+CIPMUX=1",1000);
sendESP8266cmd("AT+CIPSERVER=1,80",1000);
return true;
}
}while((timeout--)>0);
return false;
}
//用戶端數據回傳函數
void httpResponse(int id, String content)
{
String head,response;
head = "HTTP/1.1 200 OK\r\n";
head += "Content-Type: text/html\r\n";
head += "Connection: close\r\n";
head += "Refresh: 8\r\n";
head += "\r\n";
response = head + content;
String cmd = "AT+CIPSEND=";
cmd += id;
cmd += ",";
cmd += response.length();
sendESP8266cmd(cmd,200);
ESP8266.print(response);
delay(200);
cmd ="AT+CIPCLOSE=";
cmd += connectionId;
sendESP8266cmd(cmd,200);
}
//ESP8266 AT指令傳送函數
void sendESP8266cmd(String cmd, int waitTime)
{
ESP8266.println(cmd);
delay(waitTime);
}
//lcd顯示字串函數
void lcdprintStr(char *str)
{
int i=0;
while(str[i]!='\0')
{
lcd.print(str[i]);
i++;
}
}
Arduino:1.8.9 (Windows 10), 開發板:"Arduino/Genuino Uno"
In file included from C:\Users\xubpc\OneDrive\Documents\Arduino\libraries\DHT_sensor_library\DHT_U.cpp:15:0:
C:\Users\xubpc\OneDrive\Documents\Arduino\libraries\DHT_sensor_library\DHT_U.h:36:29: fatal error: Adafruit_Sensor.h: No such file or directory
compilation terminated.
exit status 1
開發板 Arduino/Genuino Uno 編譯錯誤。
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
求解
你好,我想要跟其他兩塊板子做資料溝通,名字分別叫APRS跟TTNC,但是分開時都沒問題,兩個合在一起就開始出現亂碼。上網找大部分都是說baun rate的問題,但是我看好像也沒有設定錯。下面是我的程式碼 #include
SoftwareSerial APRS(3,2); //RX,TX
SoftwareSerial TTNC(5,4);
void setup(){
Serial.begin(9600);
while (!Serial) {}
APRS.begin(9600);
TTNC.begin(9600);
}
void loop(){
APRS.listen();
delay(100); //這邊好像沒有delay就印不出來
while( APRS.available()>0 )
Serial.write( APRS.read() ); //收到訊號時 在監控視窗印出資料
TTNC.listen();
//delay(100);
while( TTNC.available()>0 )
Serial.write( TTNC.read() );
}
您好,我是第一次使用arduino的人,想讓流量計幫我檢測水流量,但驗證的時候出了問題,能請你幫我看看嗎? exit status 1 expected initializer before 'n' 它是這麼顯示的 void setup() { // put your setup code here, to run once: } void loop() { // reading liquid flow rate using Seeeduino and Water Flow Sensor from Seeedstudio.com // Code adapted by Charles Gantt from PC Fan RPM code written by Crenn @thebestcasescenario.com // http:/themakersworkbench.com http://thebestcasescenario.com http://seeedstudio.com volatile int NbTopsFan; //measuring the rising edges of the signal int Calc; int hallsensor = 2; //The pin location of the sensor void rpm () //This is the function that the interupt calls '{' 'n''a6e''NbTopsFan'++; //This function measures the rising and falling edge of the hall effect sensors signal } // The setup() method runs once, when the sketch starts void setup() //'{' pinMode(hallsensor, INPUT); //initializes digital pin 2 as an input Serial.begin(9600); //This is the setup function where the serial port is initialised, attachInterrupt(0, rpm, RISING); //and the interrupt is attached } // the loop() method runs over and over again, // as long as the Arduino has power void loop () '{' NbTopsFan = 0; //Set NbTops to 0 ready for calculations sei(); //Enables interrupts delay (1000); //Wait 1 second cli(); //Disable interrupts Calc = (NbTopsFan * 60 / 7.5); //(Pulse frequency x 60) / 7.5Q, = flow rate in L/hour Serial.print (Calc, DEC); //Prints the number calculated above Serial.print (" L/hour\r\n"); //Prints "L/hour" and returns a new line } 順道說聲新年快樂XD
我剛看你的程式 有些地方調整後就可以編譯 volatile int NbTopsFan; //measuring the rising edges of the signal int Calc; int hallsensor = 2; //The pin location of the sensor void rpm() { NbTopsFan++; //This function measures the rising and falling edge of the hall effect sensors signal } void setup() // The setup() method runs once, when the sketch starts { pinMode(hallsensor, INPUT); //initializes digital pin 2 as an input Serial.begin(9600); //This is the setup function where the serial port is initialised, attachInterrupt(0, rpm, RISING); //and the interrupt is attached } void loop (){ NbTopsFan = 0; //Set NbTops to 0 ready for calculations sei(); //Enables interrupts delay (1000); //Wait 1 second cli(); //Disable interrupts Calc = (NbTopsFan * 60 / 7.5); //(Pulse frequency x 60) / 7.5Q, = flow rate in L/hour Serial.print (Calc, DEC); //Prints the number calculated above Serial.print (" L/hour\r\n"); //Prints "L/hour" and returns a new line }
Arduino:1.8.0 (Windows 10), 開發板:"ESPDuino (ESP-13 Module), ESPduino-V1, 80 MHz, Flash, Legacy (new can return nullptr), All SSL ciphers (most compatible), 4MB (FS:2MB OTA:~1019KB), v2 Lower Memory, Disabled, None, Only Sketch, 115200" C:\Users\BILL\Desktop\撠???program\PROGRAM_MAIN\PROGRAM_MAIN.ino: In function 'void BlynkWidgetWrite21(BlynkReq&, const BlynkParam&)': C:\Users\BILL\Desktop\撠???program\PROGRAM_MAIN\PROGRAM_MAIN.ino:434:7: warning: unused variable 'b' [-Wunused-variable] C:\Users\BILL\Desktop\撠???program\PROGRAM_MAIN\PROGRAM_MAIN.ino: In function 'void BlynkWidgetWrite22(BlynkReq&, const BlynkParam&)': C:\Users\BILL\Desktop\撠???program\PROGRAM_MAIN\PROGRAM_MAIN.ino:448:7: warning: unused variable 'a' [-Wunused-variable] C:\Users\BILL\Desktop\撠???program\PROGRAM_MAIN\PROGRAM_MAIN.ino: In function 'void BlynkWidgetWrite23(BlynkReq&, const BlynkParam&)': C:\Users\BILL\Desktop\撠???program\PROGRAM_MAIN\PROGRAM_MAIN.ino:477:7: warning: unused variable 'b' [-Wunused-variable] C:\Users\BILL\Desktop\撠???program\PROGRAM_MAIN\PROGRAM_MAIN.ino:469:7: warning: unused variable 'a' [-Wunused-variable] C:\Users\BILL\Desktop\撠???program\PROGRAM_MAIN\PROGRAM_MAIN.ino: In function 'void BlynkWidgetWrite24(BlynkReq&, const BlynkParam&)': C:\Users\BILL\Desktop\撠???program\PROGRAM_MAIN\PROGRAM_MAIN.ino:491:5: warning: unused variable 'a' [-Wunused-variable] C:\Users\BILL\Desktop\撠???program\PROGRAM_MAIN\PROGRAM_MAIN.ino:492:5: warning: unused variable 'b' [-Wunused-variable] C:\Users\BILL\Desktop\撠???program\PROGRAM_MAIN\PROGRAM_MAIN.ino: In function 'void BlynkWidgetWrite25(BlynkReq&, const BlynkParam&)': C:\Users\BILL\Desktop\撠???program\PROGRAM_MAIN\PROGRAM_MAIN.ino:502:5: warning: unused variable 'a' [-Wunused-variable] C:\Users\BILL\Desktop\撠???program\PROGRAM_MAIN\PROGRAM_MAIN.ino:503:5: warning: unused variable 'b' [-Wunused-variable] Executable segment sizes: IROM : 251480 - code in flash (default or ICACHE_FLASH_ATTR) IRAM : 29140 / 32768 - code in IRAM (ICACHE_RAM_ATTR, ISRs...) DATA : 1320 ) - initialized variables (global, static) in RAM/HEAP RODATA : 2216 ) / 81920 - constants (global, static) in RAM/HEAP BSS : 26064 ) - zeroed variables (global, static) in RAM/HEAP 草稿碼使用了 284156 bytes (27%) 的程式儲存空間。上限為 1044464 bytes。 全域變數使用了 29600 bytes (36%) 的動態記憶體,剩餘 52320 bytes 給區域變數。上限為 81920 bytes 。 esptool.py v2.8 Serial port COM3 Connecting........_____....._____....._____....._____....._____....._____.....____Traceback (most recent call last): File "C:\Users\BILL\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.6.2/tools/upload.py", line 65, in
esptool.main(cmdline)
File "C:/Users/BILL/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/2.6.2/tools/esptool\esptool.py", line 2890, in main
esp.connect(args.before)
File "C:/Users/BILL/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/2.6.2/tools/esptool\esptool.py", line 483, in connect
raise FatalError('Failed to connect to %s: %s' % (self.CHIP_NAME, last_error))
esptool.FatalError: Failed to connect to ESP8266: Timed out waiting for packet header
esptool.FatalError: Failed to connect to ESP8266: Timed out waiting for packet header
_
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
錯誤訊息: Arduino:1.8.12 (Windows 10), 開發板:"Arduino Uno" C:\Users\dena1\Desktop\switch\switch.ino: In function 'void job_a()': switch:46:16: error: a function-definition is not allowed here before '{' token void setup() { ^ switch:50:15: error: a function-definition is not allowed here before '{' token void loop() { ^ C:\Users\dena1\Desktop\switch\switch.ino: In function 'void job_b()': switch:73:16: error: a function-definition is not allowed here before '{' token void setup() { ^ switch:77:15: error: a function-definition is not allowed here before '{' token void loop() { ^ C:\Users\dena1\Desktop\switch\switch.ino: In function 'void job_c()': switch:100:16: error: a function-definition is not allowed here before '{' token void setup() { ^ switch:106:15: error: a function-definition is not allowed here before '{' token void loop() { ^ C:\Users\dena1\Desktop\switch\switch.ino: In function 'void job_d()': switch:138:16: error: a function-definition is not allowed here before '{' token void setup() { ^ switch:144:14: error: a function-definition is not allowed here before '{' token void loop(){ ^ exit status 1 a function-definition is not allowed here before '{' token This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences. ------------------------------------------------------------------------------------------- 程式碼: int incomingByte = 0; void job_a(); void job_b(); void job_c(); void job_d(); void setup() { Serial.begin(9600); } void loop() { if (Serial.available() > 0) { incomingByte = Serial.read() - 48; Serial.print("I received: "); Serial.println(incomingByte, DEC); } switch ( incomingByte ) { case 0 : job_a(); Serial.println("doing job_a."); break; case 1 : job_b(); Serial.println("doing job_b."); break; case 2 : job_c(); Serial.println("doing job_c."); break; case 3 : job_d(); Serial.println("doing job_d."); break; default : Serial.println("doing nothing."); } } void job_a() { const byte startPin = 5; const byte endPin = 12; byte lightPin = startPin; void setup() { for (byte i = startPin ; i <= endPin ; i++) pinMode(i, OUTPUT); } void loop() { for (byte i = startPin ; i <= endPin ; i++) digitalWrite(i, HIGH); digitalWrite(lightPin, LOW); if (lightPin < endPin) lightPin++; else lightPin = startPin; delay(200); } setup(); loop(); } void job_b() { const byte startPin = 12; const byte endPin = 5; byte lightPin = startPin; void setup() { for (byte i = startPin ; i >= endPin ; i--) pinMode(i, OUTPUT); } void loop() { for (byte i = startPin ; i >= endPin ; i--) digitalWrite(i, HIGH); digitalWrite(lightPin, LOW); if (lightPin > endPin) lightPin--; else lightPin = startPin; delay(200); } setup(); loop(); } void job_c() { const byte startPin = 5; const byte endPin = 12; byte lightPin = startPin; void setup() { for (byte i = startPin ; i <= endPin ; i++) pinMode(i, OUTPUT); for (byte j = endPin ; j >= startPin ; j--) pinMode(j, OUTPUT); } void loop() { for (byte i = startPin ; i <= endPin ; i++) digitalWrite(i, HIGH); digitalWrite(lightPin, LOW); if (lightPin < endPin) lightPin++; else if (lightPin = endPin) { for (byte j = lightPin ; j >= startPin ; j--) digitalWrite(j, HIGH); digitalWrite(lightPin, LOW); if (lightPin > startPin) lightPin--; else lightPin = startPin; } delay(200); } setup(); loop(); } void job_d() { const byte startPin1 = 5; const byte startPin2 = 12; const byte endPin1 = 8; const byte endPin2 = 9; byte lightPin1 = startPin1; byte lightPin2 = startPin2; void setup() { for (byte i = startPin1 ; i <= endPin1 ; i++) pinMode(i, OUTPUT); for (byte j = startPin2 ; j >= endPin2 ; j--) pinMode(j, OUTPUT); } void loop(){ for (byte i = startPin1 ; i <= endPin1 ; i++) digitalWrite(i, HIGH); digitalWrite(lightPin1, LOW); if (lightPin1 < endPin1) lightPin1++; else lightPin1 = startPin1; delay(50); for (byte j = startPin2 ; j >= endPin2 ; j--) digitalWrite(j, HIGH); digitalWrite(lightPin2, LOW); if (lightPin2 > endPin2) lightPin2--; else lightPin2 = startPin2; delay(50); } setup(); loop(); }
Arduino:1.6.5 (Windows 8.1), 板子:"Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)" 草稿碼使用了 1,670 bytes (0%) 的程式存儲空間。最大值為 253,952 bytes。 全域變數使用了 9 bytes (0%) 動態記憶體,剩餘 8,183 bytes 的局部變數。最大值為 8,192 bytes 。 avrdude: ser_open(): can't open device "\\.\COM8": 系統找不到指定的檔案。 avrdude: ser_drain(): read error: 控制代碼無效。 http://www.arduino.cc/en/Guide/Troubleshooting#upload。
#include
#define DHTPIN 2
#define DHTTYPE DHT11
DHT dht(DHTPIN,DHTTYPE); //初始化DHT傳感器
void setup(){
Serial.begin(9600);
Serial.println(“ DHT11測試!”);
dht.begin();
}
void loop(){
delay(2000);
float h = dht.readHumidity();
浮點數t = dht.readTemperature();
float f = dht.readTemperature(true);
if(isnan(h)|| isnan(t)|| isnan(f)){
Serial.println(“無法從DHT傳感器讀取!”);
返回;
}
Serial.print(“ Humidity:”);
Serial.print(h);
Serial.print(“
Serial.print(“ Temperature:”);
Serial.print(t);
Serial.print(“ * C \ t”);
Serial.print(f);
Serial.print(“ * F \ n”);
}
開發板 Arduino Uno 編譯錯誤。
程式可以用email寄給我哦
int DHPin=7; byte dat[5]; byte read_data() { byte data; for(int i=0; i<8;i++) { if(digitalRead(DHPin)==LOW) { while(digitalRead(DHPin)==LOW); //等待 delayMicroseconds(30); //判斷高電位的持續時間,以判定數據是‘0’還是‘1’ if(digitalRead(DHPin)==HIGH) data |=(1<<(7-i)); //高位在前,低位在後 while(digitalRead(DHPin) == HIGH); //數據 } } return data; } void start_test() { digitalWrite(DHPin,LOW); //拉低總線,發開始信號 delay(30); //延遲時間要大於 18ms,以便檢測器能檢測到開始訊號; digitalWrite(DHPin,HIGH); delayMicroseconds(40); //等待感測器響應; PinMode(DHPin,INPUT); while(digitalRead(DHPin) == HIGH); delayMicroseconds(80); //發出響應,拉低总线 80us; if(digitalRead(DHPin) == LOW); delayMicroseconds(80); //線路 80us 後開始發送數據; for(int i=0;i<4;i++) //接收溫溼度數據,校验位不考虑; dat[i] = read_data(); PinMode(DHPin,OUTPUT); digitalWrite(DHPin,HIGH); //發送完數據後釋放線路,等待下一次的開始訊號; } void setup() { Serial.begin(9600); PinMode(DHPin,OUTPUT); } void loop() { start_test(); Serial.print("Current humdity = "); Serial.print(dat[0], DEC); //顯示濕度的 Serial.print('.'); Serial.print(dat[1],DEC); //顯示濕度的小數位; Serial.println('%'); Serial.print("Current temperature = "); Serial.print(dat[2], DEC); //顯示溫度的整數位; Serial.print('.'); Serial.print(dat[3],DEC); //顯示溫度的小數位; Serial.println('C'); delay(700); } 'PinMode' was not declared in this scope
程式可以用email寄給我哦
Arduino:1.8.12 (Windows Store 1.8.33.0) (Windows 10), 開發板:"Arduino Uno" In file included from sketch\END_6.ino.cpp:1:0: C:\Users\User\Documents\Arduino\END_6\END_6.ino: In function 'void loop()': D:\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.33.0_x86__mdqgnx93n4wtt\hardware\arduino\avr\cores\arduino/Arduino.h:41:14: error: lvalue required as left operand of assignment #define LOW 0x0 ^ C:\Users\User\Documents\Arduino\END_6\END_6.ino:28:47: note: in expansion of macro 'LOW' while (btnStatus_1 = HIGH && btnStatus_2 = LOW) { ^~~ D:\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.33.0_x86__mdqgnx93n4wtt\hardware\arduino\avr\cores\arduino/Arduino.h:41:14: error: lvalue required as left operand of assignment #define LOW 0x0 ^ C:\Users\User\Documents\Arduino\END_6\END_6.ino:36:49: note: in expansion of macro 'LOW' while (btnStatus_2 = HIGH && btnStatus_1 = LOW) { ^~~ exit status 1 開發板 Arduino Uno 編譯錯誤。 This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences. 請問要怎麼辦
程式可以用email寄給我哦
Arduino:1.8.12 (Windows 10), 開發板:"Arduino Uno" C:\Users\user\AppData\Local\Temp\ccNAhAZO.ltrans0.ltrans.o: In function `main': C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/main.cpp:46: undefined reference to `loop' collect2.exe: error: ld returned 1 exit status exit status 1 開發板 Arduino Uno 編譯錯誤。 This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences.
Arduino:1.6.13 (Windows 10), 開發板:"Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)" C:\Users\BM6630\AppData\Local\Temp\cc2bFTZX.ltrans0.ltrans.o: In function `main': C:\Users\BM6630\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.3\cores\arduino/main.cpp:43: undefined reference to `setup' C:\Users\BM6630\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.3\cores\arduino/main.cpp:46: undefined reference to `loop' collect2.exe: error: ld returned 1 exit status exit status 1 開發板 Arduino Mega or Mega 2560 編譯錯誤。 This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences.
/* Test sketch for Adafruit PM2.5 sensor with UART or I2C */ #include "Adafruit_PM25AQI.h" // If your PM2.5 is UART only, for UNO and others (without hardware serial) // we must use software serial... // pin #2 is IN from sensor (TX pin on sensor), leave pin #3 disconnected // comment these two lines if using hardware serial //#include
//SoftwareSerial pmSerial(2, 3);
Adafruit_PM25AQI aqi = Adafruit_PM25AQI();
void setup() {
// Wait for serial monitor to open
Serial.begin(115200);
while (!Serial) delay(10);
Serial.println("Adafruit PMSA003I Air Quality Sensor");
// Wait one second for sensor to boot up!
delay(1000);
// If using serial, initialize it and set baudrate before starting!
// Uncomment one of the following
//Serial1.begin(9600);
//pmSerial.begin(9600);
// There are 3 options for connectivity!
if (! aqi.begin_I2C()) { // connect to the sensor over I2C
//if (! aqi.begin_UART(&Serial1)) { // connect to the sensor over hardware serial
//if (! aqi.begin_UART(&pmSerial)) { // connect to the sensor over software serial
Serial.println("Could not find PM 2.5 sensor!");
while (1) delay(10);
}
Serial.println("PM25 found!");
}
void loop() {
PM25_AQI_Data data;
if (! aqi.read(&data)) {
Serial.println("Could not read from AQI");
delay(500); // try again in a bit!
return;
}
Serial.println("AQI reading success");
Serial.println();
Serial.println(F("---------------------------------------"));
Serial.println(F("Concentration Units (standard)"));
Serial.println(F("---------------------------------------"));
Serial.print(F("PM 1.0: ")); Serial.print(data.pm10_standard);
Serial.print(F("\t\tPM 2.5: ")); Serial.print(data.pm25_standard);
Serial.print(F("\t\tPM 10: ")); Serial.println(data.pm100_standard);
Serial.println(F("Concentration Units (environmental)"));
Serial.println(F("---------------------------------------"));
Serial.print(F("PM 1.0: ")); Serial.print(data.pm10_env);
Serial.print(F("\t\tPM 2.5: ")); Serial.print(data.pm25_env);
Serial.print(F("\t\tPM 10: ")); Serial.println(data.pm100_env);
Serial.println(F("---------------------------------------"));
Serial.print(F("Particles > 0.3um / 0.1L air:")); Serial.println(data.particles_03um);
Serial.print(F("Particles > 0.5um / 0.1L air:")); Serial.println(data.particles_05um);
Serial.print(F("Particles > 1.0um / 0.1L air:")); Serial.println(data.particles_10um);
Serial.print(F("Particles > 2.5um / 0.1L air:")); Serial.println(data.particles_25um);
Serial.print(F("Particles > 5.0um / 0.1L air:")); Serial.println(data.particles_50um);
Serial.print(F("Particles > 10 um / 0.1L air:")); Serial.println(data.particles_100um);
Serial.println(F("---------------------------------------"));
delay(1000);
}
Warning: Board arduino:avr:atmega168 doesn't define a 'build.board' preference. Auto-set to: AVR_ATMEGA168
Warning: Board arduino:avr:Clio doesn't define a 'build.board' preference. Auto-set to: AVR_CLIO
Warning: Board arduino:avr:mega2560 doesn't define a 'build.board' preference. Auto-set to: AVR_MEGA2560
Warning: Board arduino:avr:bt328 doesn't define a 'build.board' preference. Auto-set to: AVR_BT328
Warning: Board arduino:avr:pro5v doesn't define a 'build.board' preference. Auto-set to: AVR_PRO5V
Warning: Board arduino:avr:Lite doesn't define a 'build.board' preference. Auto-set to: AVR_LITE
Warning: Board arduino:avr:mini328 doesn't define a 'build.board' preference. Auto-set to: AVR_MINI328
Warning: Board arduino:avr:atmega328 doesn't define a 'build.board' preference. Auto-set to: AVR_ATMEGA328
Warning: Board arduino:avr:pro328 doesn't define a 'build.board' preference. Auto-set to: AVR_PRO328
Warning: Board arduino:avr:atmega8 doesn't define a 'build.board' preference. Auto-set to: AVR_ATMEGA8
Warning: Board arduino:avr:Node doesn't define a 'build.board' preference. Auto-set to: AVR_NODE
Warning: Board arduino:avr:pro5v328 doesn't define a 'build.board' preference. Auto-set to: AVR_PRO5V328
Warning: Board arduino:avr:nano328 doesn't define a 'build.board' preference. Auto-set to: AVR_NANO328
Warning: Board arduino:avr:lilypad328 doesn't define a 'build.board' preference. Auto-set to: AVR_LILYPAD328
Warning: Board arduino:avr:Xadow doesn't define a 'build.board' preference. Auto-set to: AVR_XADOW
C:\Users\tsvs\Downloads\PM25_test\PM25_test.ino:3:30: fatal error: Adafruit_PM25AQI.h: No such file or directory
compilation terminated.
exit status 1
開發板 Arduino/Genuino Uno 編譯錯誤。