Bonjour,
Pour tester un nouveau LCD (DFR0464), j'ai utilisé l'exemple suivant pris sur le site Github (ici: https://github.com/DFRobot/DFRobot_RGBLCD1602/tree/master/examples/Roll):
/*!
* @file Roll.ino
* @brief Roll show 'hello, world!'.
* @copyright Copyright (c) 2010 DFRobot Co.Ltd (http://www.dfrobot.com)
* @licence The MIT License (MIT)
* @maintainer [yangfeng](feng.yang@dfrobot.com)
* @version V1.0
* @date 2021-09-24
* @url https://github.com/DFRobot/DFRobot_RGBLCD1602
*/
/*
Emplacement du programme:
U:\ELECTRONIQUE\ARDUINO\AFFICHEURS LCD\DFRobot_DFR0464 with RGB backlight\pgm arduino\roll_01\roll_01.ino
*/
#include "DFRobot_RGBLCD1602.h"
/*
Change the RGBaddr value based on the hardware version
-----------------------------------------
Moudule | Version| RGBAddr|
-----------------------------------------
LCD1602 Module | V1.0 | 0x60 |
-----------------------------------------
LCD1602 Module | V1.1 | 0x6B |
-----------------------------------------
LCD1602 RGB Module | V1.0 | 0x60 |
-----------------------------------------
LCD1602 RGB Module | V1.1 | 0x2D |
-----------------------------------------
*/
DFRobot_RGBLCD1602 lcd(/*RGBAddr*/0x60 ,/*lcdCols*/16,/*lcdRows*/2); //16 characters and 2 lines of show
void setup() {
/**
* @brief initialize the LCD and master IIC
*/
lcd.init();
// Print a message to the LCD.
lcd.print("hello, world!");
delay(1000);
}
void loop() {
// scroll 13 positions (string length) to the left
// to move it offscreen left:
for (int positionCounter = 0; positionCounter < 13; positionCounter++) {
/**
* @brief scroll left to display
*/
lcd.scrollDisplayLeft();//scroll one position left
// wait a bit:
delay(150);
}
// scroll 29 positions (string length + show length) to the right
// to move it offscreen right:
for (int positionCounter = 0; positionCounter < 29; positionCounter++) {
/**
* @brief scroll right to display
*/
lcd.scrollDisplayRight();//scroll one position right
// wait a bit:
delay(150);
}
// scroll 16 positions (show length + string length) to the left
// to move it back to center:
for (int positionCounter = 0; positionCounter < 16; positionCounter++) {
// scroll one position left:
lcd.scrollDisplayLeft();
// wait a bit:
delay(150);
}
// delay at the end of the full loop:
delay(1000);
}
j'obtiens ce message d'erreur:
Arduino : 1.8.15 (Windows 10), TD: 1.57, Carte : "Arduino Uno"
E:\Programmes\Arduino\arduino-builder -dump-prefs -logger=machine -hardware E:\Programmes\Arduino\hardware -hardware C:\Users\Michel\AppData\Local\Arduino15\packages -tools E:\Programmes\Arduino\tools-builder -tools E:\Programmes\Arduino\hardware\tools\avr -tools C:\Users\Michel\AppData\Local\Arduino15\packages -built-in-libraries E:\Programmes\Arduino\libraries -libraries C:\Users\Michel\Documents\Arduino\libraries -fqbn=arduino:avr:uno -vid-pid=2341_0043 -ide-version=10815 -build-path C:\Users\Michel\AppData\Local\Temp\arduino_build_672 -warnings=none -build-cache C:\Users\Michel\AppData\Local\Temp\arduino_cache_426639 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avrdude.path=C:\Users\Michel\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17 -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=C:\Users\Michel\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17 -prefs=runtime.tools.avr-gcc.path=C:\Users\Michel\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=C:\Users\Michel\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.arduinoOTA.path=C:\Users\Michel\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\Users\Michel\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -verbose U:\ELECTRONIQUE\ARDUINO\AFFICHEURS LCD\DFRobot_DFR0464 with RGB backlight\pgm arduino\roll_01\roll_01.ino
E:\Programmes\Arduino\arduino-builder -compile -logger=machine -hardware E:\Programmes\Arduino\hardware -hardware C:\Users\Michel\AppData\Local\Arduino15\packages -tools E:\Programmes\Arduino\tools-builder -tools E:\Programmes\Arduino\hardware\tools\avr -tools C:\Users\Michel\AppData\Local\Arduino15\packages -built-in-libraries E:\Programmes\Arduino\libraries -libraries C:\Users\Michel\Documents\Arduino\libraries -fqbn=arduino:avr:uno -vid-pid=2341_0043 -ide-version=10815 -build-path C:\Users\Michel\AppData\Local\Temp\arduino_build_672 -warnings=none -build-cache C:\Users\Michel\AppData\Local\Temp\arduino_cache_426639 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avrdude.path=C:\Users\Michel\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17 -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=C:\Users\Michel\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17 -prefs=runtime.tools.avr-gcc.path=C:\Users\Michel\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=C:\Users\Michel\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.arduinoOTA.path=C:\Users\Michel\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\Users\Michel\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -verbose U:\ELECTRONIQUE\ARDUINO\AFFICHEURS LCD\DFRobot_DFR0464 with RGB backlight\pgm arduino\roll_01\roll_01.ino
Using board 'uno' from platform in folder: C:\Users\Michel\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.5
Using core 'arduino' from platform in folder: C:\Users\Michel\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.5
Detecting libraries used...
"C:\\Users\\Michel\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10815 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\Michel\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\cores\\arduino" "-IC:\\Users\\Michel\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\variants\\standard" "C:\\Users\\Michel\\AppData\\Local\\Temp\\arduino_build_672\\sketch\\roll_01.ino.cpp" -o nul
Alternatives for Wire.h: [Wire@1.0]
ResolveLibrary(Wire.h)
-> candidates: [Wire@1.0]
"C:\\Users\\Michel\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10815 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\Michel\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\cores\\arduino" "-IC:\\Users\\Michel\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\variants\\standard" "-IC:\\Users\\Michel\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\libraries\\Wire\\src" "C:\\Users\\Michel\\AppData\\Local\\Temp\\arduino_build_672\\sketch\\roll_01.ino.cpp" -o nul
"C:\\Users\\Michel\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10815 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\Michel\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\cores\\arduino" "-IC:\\Users\\Michel\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\variants\\standard" "-IC:\\Users\\Michel\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\libraries\\Wire\\src" "C:\\Users\\Michel\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\libraries\\Wire\\src\\Wire.cpp" -o nul
"C:\\Users\\Michel\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10815 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\Michel\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\cores\\arduino" "-IC:\\Users\\Michel\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\variants\\standard" "-IC:\\Users\\Michel\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\libraries\\Wire\\src" "C:\\Users\\Michel\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\libraries\\Wire\\src\\utility\\twi.c" -o nul
Generating function prototypes...
"C:\\Users\\Michel\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10815 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\Michel\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\cores\\arduino" "-IC:\\Users\\Michel\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\variants\\standard" "-IC:\\Users\\Michel\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\libraries\\Wire\\src" "C:\\Users\\Michel\\AppData\\Local\\Temp\\arduino_build_672\\sketch\\roll_01.ino.cpp" -o "C:\\Users\\Michel\\AppData\\Local\\Temp\\arduino_build_672\\preproc\\ctags_target_for_gcc_minus_e.cpp"
"E:\\Programmes\\Arduino\\tools-builder\\ctags\\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\\Users\\Michel\\AppData\\Local\\Temp\\arduino_build_672\\preproc\\ctags_target_for_gcc_minus_e.cpp"
Compilation du croquis...
"C:\\Users\\Michel\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10815 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\Michel\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\cores\\arduino" "-IC:\\Users\\Michel\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\variants\\standard" "-IC:\\Users\\Michel\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\libraries\\Wire\\src" "C:\\Users\\Michel\\AppData\\Local\\Temp\\arduino_build_672\\sketch\\roll_01.ino.cpp" -o "C:\\Users\\Michel\\AppData\\Local\\Temp\\arduino_build_672\\sketch\\roll_01.ino.cpp.o"
Compiling libraries...
Compiling library "Wire"
"C:\\Users\\Michel\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10815 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\Michel\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\cores\\arduino" "-IC:\\Users\\Michel\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\variants\\standard" "-IC:\\Users\\Michel\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\libraries\\Wire\\src" "C:\\Users\\Michel\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\libraries\\Wire\\src\\Wire.cpp" -o "C:\\Users\\Michel\\AppData\\Local\\Temp\\arduino_build_672\\libraries\\Wire\\Wire.cpp.o"
"C:\\Users\\Michel\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-gcc" -c -g -Os -w -std=gnu11 -ffunction-sections -fdata-sections -MMD -flto -fno-fat-lto-objects -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10815 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\Michel\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\cores\\arduino" "-IC:\\Users\\Michel\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\variants\\standard" "-IC:\\Users\\Michel\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\libraries\\Wire\\src" "C:\\Users\\Michel\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\libraries\\Wire\\src\\utility\\twi.c" -o "C:\\Users\\Michel\\AppData\\Local\\Temp\\arduino_build_672\\libraries\\Wire\\utility\\twi.c.o"
Compiling core...
Using precompiled core: C:\Users\Michel\AppData\Local\Temp\arduino_cache_426639\core\core_arduino_avr_uno_a5afed7245deae3c4ac4b21b0d97f794.a
Linking everything together...
"C:\\Users\\Michel\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-gcc" -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega328p -o "C:\\Users\\Michel\\AppData\\Local\\Temp\\arduino_build_672/roll_01.ino.elf" "C:\\Users\\Michel\\AppData\\Local\\Temp\\arduino_build_672\\sketch\\roll_01.ino.cpp.o" "C:\\Users\\Michel\\AppData\\Local\\Temp\\arduino_build_672\\libraries\\Wire\\Wire.cpp.o" "C:\\Users\\Michel\\AppData\\Local\\Temp\\arduino_build_672\\libraries\\Wire\\utility\\twi.c.o" "C:\\Users\\Michel\\AppData\\Local\\Temp\\arduino_build_672/..\\arduino_cache_426639\\core\\core_arduino_avr_uno_a5afed7245deae3c4ac4b21b0d97f794.a" "-LC:\\Users\\Michel\\AppData\\Local\\Temp\\arduino_build_672" -lm
C:\Users\Michel\AppData\Local\Temp\ccXmklro.ltrans0.ltrans.o: In function `global constructors keyed to 65535_0_roll_01.ino.cpp.o.1764':
<artificial>:(.text.startup+0x36): undefined reference to `DFRobot_RGBLCD1602::DFRobot_RGBLCD1602(unsigned char, unsigned char, unsigned char, TwoWire*, unsigned char)'
C:\Users\Michel\AppData\Local\Temp\ccXmklro.ltrans0.ltrans.o: In function `setup':
U:\ELECTRONIQUE\ARDUINO\AFFICHEURS LCD\DFRobot_DFR0464 with RGB backlight\pgm arduino\roll_01/roll_01.ino:38: undefined reference to `DFRobot_RGBLCD1602::init()'
C:\Users\Michel\AppData\Local\Temp\ccXmklro.ltrans0.ltrans.o: In function `loop':
U:\ELECTRONIQUE\ARDUINO\AFFICHEURS LCD\DFRobot_DFR0464 with RGB backlight\pgm arduino\roll_01/roll_01.ino:51: undefined reference to `DFRobot_RGBLCD1602::scrollDisplayLeft()'
U:\ELECTRONIQUE\ARDUINO\AFFICHEURS LCD\DFRobot_DFR0464 with RGB backlight\pgm arduino\roll_01/roll_01.ino:62: undefined reference to `DFRobot_RGBLCD1602::scrollDisplayRight()'
U:\ELECTRONIQUE\ARDUINO\AFFICHEURS LCD\DFRobot_DFR0464 with RGB backlight\pgm arduino\roll_01/roll_01.ino:71: undefined reference to `DFRobot_RGBLCD1602::scrollDisplayLeft()'
collect2.exe: error: ld returned 1 exit status
Utilisation de la bibliothèque Wire version 1.0 dans le dossier: C:\Users\Michel\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.5\libraries\Wire
exit status 1
Erreur de compilation pour la carte Arduino Uno
J'ai bien installé la bibliothèque "DFRoboto_RGBLCD1602.h" depuis l'IDE Arduino (Gestionnaire de bibliothèques) et dans le répertoire du projet au cas où il la chercherait localement.
Quel est le problème docteur ??!