公告版位
沒有痛苦 就沒有收穫 有問題詢問來信 jingluenwork@gmail.com
pre class="brush: cpp" <>

錯誤處理

注意:如果編譯直行時出現下列訊息,就是電腦與 Arduino 板子無法溝通。

此時需注意下列事項。

  1. USB 有沒有連接。(看 Arduino 板子上的燈有沒有亮就可以確認這點)
  2. 有沒有設定 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。
創作者介紹
創作者 阿倫 的頭像
阿倫

不會的就放這邊

阿倫 發表在 痞客邦 留言(42) 人氣()


留言列表 (42)

發表留言
  • 訪客
  • avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x45
    出現這個是什麼問題呢
  • 不要選AVR ISP

    阿倫 於 2017/01/12 03:43 回覆

  • set
  • avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x45
    這是甚麼問題呢
  • 不要選AVR ISP

    阿倫 於 2017/01/12 03:43 回覆

  • 游政修
  • sketch_may23a.ino:42:20: error: invalid suffix "AEB" on integer constant
  • ?

    阿倫 於 2016/05/27 09:59 回覆

  • 訪客
  • 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 編譯錯誤。

  • 有東西沒有載入吧

    阿倫 於 2017/11/07 11:59 回覆

  • JOHN
  • 請問一下這是甚麼意思?
    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.
  • mpxup164
  • 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.
  • 怎會亂碼
    有用最新版本試看看嗎

    阿倫 於 2017/11/07 11:59 回覆

  • QK
  • 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.<init>(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.
  • 重開一個專案編看看

    阿倫 於 2017/11/12 20:55 回覆

  • 訪客
  • 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版本試看看

    阿倫 於 2017/11/27 10:20 回覆

  • 訪客
  • 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

    阿倫 於 2017/11/27 13:52 回覆

  • 訪客
  • 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

    阿倫 於 2017/12/07 11:34 回覆

  • 訪客
  • 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 <dht.h>

    ^

    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

    阿倫 於 2017/12/29 17:20 回覆

  • 訪客
  • 建置選項已變更,重新建置
    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或什麼設備嗎?

    阿倫 於 2018/01/16 10:34 回覆

  • 訪客
  • exit status 1
    開發板 Arduino Nano 編譯錯誤。
    請問這是甚麼問題呢???
  • 關掉防毒軟體看看

    阿倫 於 2018/02/21 11:35 回覆

  • 訪客
  • 這是甚麼問題
    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.
  • 你路徑換成英文路徑看看 都變亂碼了

    阿倫 於 2018/02/21 11:37 回覆

  • 彥彥

  • 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 <Adafruit_Sensor.h>

    ^

    compilation terminated.

    exit status 1
    開發板 Arduino/Genuino Uno 編譯錯誤。
  • 要載入濕度感測器的.h檔
    可以收尋一下google

    阿倫 於 2018/02/21 11:37 回覆

  • 彥彥
  • sketch_feb20a:3: error: #include expects "FILENAME" or <FILENAME>

    #include

    ^

    sketch_feb20a:4: error: #include expects "FILENAME" or <FILENAME>

    #include

    ^

    exit status 1
    #include expects "FILENAME" or <FILENAME>
    這是哪邊的問題阿感謝
  • 試看看前面加入 #include "recip.hpp"

    或是 include " XXX" 改成 <XXXX>

    阿倫 於 2018/02/21 11:40 回覆

  • kid6535
  • 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 <softwareserial.h>

    ^

    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.
    請問這是什麼問題
  • Jake
  • 請問願意一對一輔導Arduino的相關技術嗎?
    願意付費的,在學習過程中碰到不少問題,
    急需請求支援.
    可以用email進一步聯繫: zlyu@ms28.hinet.net
    感恩!!
  • hi您好
    有什麼能幫助您的
    email如下
    jingluenwork @ gmail.com

    阿倫 於 2018/03/21 11:32 回覆

  • 訪客
  • 編譯找到多個程式庫怎麼解決
  • 可能lib有重複到

    阿倫 於 2018/05/23 11:36 回覆

  • 阿瑄
  • 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; i <long(duration)* 1000; i + = tone * 2)
    {
    digitalWrite(Out_pin_Phone,HIGH);
    delayMicroseconds(音);
    digitalWrite(Out_pin_Phone,LOW);
    delayMicroseconds(音);
    }
    }

    最後顯示
    exit status 1
    stary '\357' in program
    請問這是甚麼意思
  • 你的一些符號 都變成"全行"囉
    改回半形就正常了

    如果需要給我信箱 我寄給你,

    或寄我信箱 jingluenwork@ gmail.com 通知我
    (信箱內有空格部分 請砍掉)

    還有 delayMicroseconds(音); 這是錯誤的哦 這是要做延遲時間嗎?

    阿倫 於 2018/06/07 14:23 回覆

  • 熊貓
  • Arduino:1.8.4 (Windows 7), 開發板:"Arduino/Genuino Uno"

    sketch_may30a:2: error: #include expects "FILENAME" or <FILENAME>

    #include

    ^

    sketch_may30a:3: error: #include expects "FILENAME" or <FILENAME>

    #include

    ^

    exit status 1
    #include expects "FILENAME" or <FILENAME>

    This report would have more information with
    "Show verbose output during compilation"
    option enabled in File -> Preferences.
  • Hao
  • 一直出現這個
    開發板 Arduino/Genuino Uno 編譯錯誤。
    如何解決,感謝
  • arduino的小新手
  • 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

    #include <SoftwareSerial.h>MeTemperature myTemp 4

    ^

    compilation terminated.

    exit status 1
    開發板 Arduino/Genuino Uno 編譯錯誤




    這是我去make block的官網抄的程式中出現的錯誤,
    大大可以幫我解讀一下嗎?
    我用的是 IDE1.8.5
    板子是ArduinoUno
  • 1.檢查你lib有沒有放錯 尤其是SoftwareSerial.h 這個lib
    2.檢查你編譯器有沒有選擇UNO 版本

    謝謝

    阿倫 於 2018/07/19 14:20 回覆

  • arduino的菜雞
  • 請問我用溫度感測器測得的溫度應該怎麼用hc05傳送到手機?
  • 手機要跟hc05做連線 ,手機要寫APP接收

    阿倫 於 2018/07/24 23:58 回覆

  • 總有一天我會成為一位程式設計師
  • 請問

    可以用藍芽傳送變數嗎?
  • 你可以的

    可以 可以用送資料

    阿倫 於 2018/07/24 23:59 回覆

  • 總有一天我會成為一位程式設計師
  • 那請問

    語法應該怎麼寫呢

    因為我才國中
    剛接觸文字編程
    以前都用積木 如:scratch等
    所以很多都還不會
  • 你可以找一本arduino的書來看
    先有個概念 會比較好上手

    阿倫 於 2018/07/25 12:54 回覆

  • 總有一天我會成為一位程式設計師

  • 謝謝您^^

    我一定會達成目標的
  • 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
    }

    阿倫 於 2018/08/07 11:23 回覆

  • arduino的小新手
  • 請問要怎麼在
    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)

    阿倫 於 2018/08/16 09:47 回覆

  • 小剛
  • 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 型號有選對嗎?

    阿倫 於 2018/08/20 06:28 回覆

  • a-ma
  • 我的板子一直無法讓我上傳,確定有下載驅動程式也確定有連接到正確的連接埠,編譯完成後就是無法上傳,想請問發生了什麼問題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

    阿倫 於 2018/10/29 09:23 回覆

  • 天使
  • 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

    阿倫 於 2018/11/17 21:39 回覆

  • 訪客
  • 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

    阿倫 於 2018/11/18 17:55 回覆

  • 訪客
  • 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.
    請問這個事怎麼回事 安裝失敗嗎?