หนูได้โจทย์จากอาจารย์ว่าให้ใช้เซ็นเซอร์วัดระยะทาง แสดงผลออกจากไฟLed โดยให้ระยะไกลไฟดับระยะใกล้ไฟติด หนูอยากทราบว่าที่หนูเขียนไว้ถูกไหมคะ ต้องแก้ตรงไหนบ้างขอบคุณค่ะ
โค้ต error
Executable segment sizes:
ICACHE : 32768 - flash instruction cache
IROM : 236740 - code in flash (default or ICACHE_FLASH_ATTR)
IRAM : 27369 / 32768 - code in IRAM (IRAM_ATTR, ISRs...)
DATA : 1496 ) - initialized variables (global, static) in RAM/HEAP
RODATA : 940 ) / 81920 - constants (global, static) in RAM/HEAP
BSS : 25688 ) - zeroed variables (global, static) in RAM/HEAP
Sketch uses 266545 bytes (25%) of program storage space. Maximum is 1044464 bytes.
Global variables use 28124 bytes (34%) of dynamic memory, leaving 53796 bytes for local variables. Maximum is 81920 bytes.
esptool.py v3.0
Serial port COM3
Traceback (most recent call last):
File "C:/Users/Admin/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/3.0.2/tools/esptool\esptool.py", line 291, in _set_port_baudrate
self._port.baudrate = baud
File "C:/Users/Admin/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/3.0.2/tools/pyserial\serial\serialutil.py", line 299, in baudrate
self._reconfigure_port()
File "C:/Users/Admin/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/3.0.2/tools/pyserial\serial\serialwin32.py", line 224, in _reconfigure_port
'Original message: {!r}'.format(ctypes.WinError()))
serial.serialutil.SerialException: Cannot configure port, something went wrong. Original message: OSError(22, 'The I/O operation has been aborted because of either a thread exit or an application request.', None, 995)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Admin\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2/tools/upload.py", line 66, in <module>
esptool.main(cmdline)
File "C:/Users/Admin/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/3.0.2/tools/esptool\esptool.py", line 3551, in main
esp = chip_class(each_port, initial_baud, args.trace)
File "C:/Users/Admin/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/3.0.2/tools/esptool\esptool.py", line 279, in __init__
self._set_port_baudrate(baud)
File "C:/Users/Admin/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/3.0.2/tools/esptool\esptool.py", line 293, in _set_port_baudrate
raise FatalError("Failed to set baud rate %d. The driver may not support this rate." % baud)
esptool.FatalError: Failed to set baud rate 115200. The driver may not support this rate.
esptool.FatalError: Failed to set baud rate 115200. The driver may not support this rate.
การต่อ