Copy error มาวางด้วยครับ
Arduino: 1.8.19 (Windows 10), Board: "NodeMCU 1.0 (ESP-12E Module), 80 MHz, Flash, Disabled (new aborts on oom), Disabled, All SSL ciphers (most compatible), 32KB cache + 32KB IRAM (balanced), Use pgm_read macros for IRAM/PROGMEM, 4MB (FS:2MB OTA:~1019KB), 2, v2 Lower Memory, Disabled, None, Only Sketch, 115200"
c:/users/khata/appdata/local/arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/3.0.3-gcc10.3-9bcba0b/bin/../lib/gcc/xtensa-lx106-elf/10.3.0/../../../../xtensa-lx106-elf/bin/ld.exe: sketch\sketch_jan21a.ino.cpp.o:(.text.setup+0x14): undefined reference to `_ZN5HX7119set_scaleEf'
c:/users/khata/appdata/local/arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/3.0.3-gcc10.3-9bcba0b/bin/../lib/gcc/xtensa-lx106-elf/10.3.0/../../../../xtensa-lx106-elf/bin/ld.exe: sketch\sketch_jan21a.ino.cpp.o:(.text.setup+0x18): undefined reference to `_ZN5HX71110set_offsetEl'
c:/users/khata/appdata/local/arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/3.0.3-gcc10.3-9bcba0b/bin/../lib/gcc/xtensa-lx106-elf/10.3.0/../../../../xtensa-lx106-elf/bin/ld.exe: sketch\sketch_jan21a.ino.cpp.o: in function `setup':
C:\Users\Khata\AppData\Local\Temp\arduino_modified_sketch_918302/sketch_jan21a.ino:18: undefined reference to `_ZN5HX7119set_scaleEf'
c:/users/khata/appdata/local/arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/3.0.3-gcc10.3-9bcba0b/bin/../lib/gcc/xtensa-lx106-elf/10.3.0/../../../../xtensa-lx106-elf/bin/ld.exe: C:\Users\Khata\AppData\Local\Temp\arduino_modified_sketch_918302/sketch_jan21a.ino:19: undefined reference to `_ZN5HX71110set_offsetEl'
c:/users/khata/appdata/local/arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/3.0.3-gcc10.3-9bcba0b/bin/../lib/gcc/xtensa-lx106-elf/10.3.0/../../../../xtensa-lx106-elf/bin/ld.exe: C:\Users\Khata\AppData\Local\Temp\arduino_modified_sketch_918302/sketch_jan21a.ino:21: undefined reference to `_ZN5HX7119get_unitsEh'
c:/users/khata/appdata/local/arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/3.0.3-gcc10.3-9bcba0b/bin/../lib/gcc/xtensa-lx106-elf/10.3.0/../../../../xtensa-lx106-elf/bin/ld.exe: sketch\sketch_jan21a.ino.cpp.o: in function `_Z12get_units_kgv':
C:\Users\Khata\AppData\Local\Temp\arduino_modified_sketch_918302/sketch_jan21a.ino:31: undefined reference to `_ZN5HX7119get_unitsEh'
c:/users/khata/appdata/local/arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/3.0.3-gcc10.3-9bcba0b/bin/../lib/gcc/xtensa-lx106-elf/10.3.0/../../../../xtensa-lx106-elf/bin/ld.exe: sketch\sketch_jan21a.ino.cpp.o: in function `loop':
C:\Users\Khata\AppData\Local\Temp\arduino_modified_sketch_918302/sketch_jan21a.ino:25: undefined reference to `_ZN5HX711C1Ehhh'
c:/users/khata/appdata/local/arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/3.0.3-gcc10.3-9bcba0b/bin/../lib/gcc/xtensa-lx106-elf/10.3.0/../../../../xtensa-lx106-elf/bin/ld.exe: sketch\sketch_jan21a.ino.cpp.o: in function `_GLOBAL__sub_I_calibration_factor':
C:\Users\Khata\AppData\Local\Temp\arduino_modified_sketch_918302/sketch_jan21a.ino:27: undefined reference to `_ZN5HX711C1Ehhh'
c:/users/khata/appdata/local/arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/3.0.3-gcc10.3-9bcba0b/bin/../lib/gcc/xtensa-lx106-elf/10.3.0/../../../../xtensa-lx106-elf/bin/ld.exe: C:\Users\Khata\AppData\Local\Temp\arduino_modified_sketch_918302/sketch_jan21a.ino:28: undefined reference to `_ZN5HX711D1Ev'
c:/users/khata/appdata/local/arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/3.0.3-gcc10.3-9bcba0b/bin/../lib/gcc/xtensa-lx106-elf/10.3.0/../../../../xtensa-lx106-elf/bin/ld.exe: sketch\sketch_jan21a.ino.cpp.o: in function `_GLOBAL__sub_D_calibration_factor':
C:\Users\Khata\AppData\Local\Temp\arduino_modified_sketch_918302/sketch_jan21a.ino:32: undefined reference to `_ZN5HX711D1Ev'
collect2.exe: error: ld returned 1 exit status
exit status 1
Error compiling for board NodeMCU 1.0 (ESP-12E Module).
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
ดูตัวอย่างนี้ครับ ผมว่าน่าจะใส่ชื่อฟังก์ชั่นซ้ำกัน