Output (in degrees) from WindSubsystemTest code using a 10′ ethernet cable.
Connection is problematic, but it does work showing that SPI signals can work fine over at least 10′. Apparently, I’m having trouble with connections from the WEMOS D1 Mini to the sensor using the header connectors I got from Aliexpress, or maybe it’s just my soldering these tiny things. But it DOES work! So now, I need to find out what’s going on with the connectors. The WindSubsystemTest code needs work too for the wind speed: I’m getting reed switch bounce issues and other math problems with wind MPH calculations.
No SPI signal or MLX angle sensor not found…
pulseCount: 0 revCount: 0 rps: 0 rpm: 0 miles/hour: 0
Heading: 208 Card: NNE
pulseCount: 0 revCount: 0 rps: 0 rpm: 0 miles/hour: 0
Heading: 207 Card: NNE
Heading: 01 Card: NNE
pulseCount: 0 revCount: 0 rps: 0 rpm: 0 miles/hour: 0
Heading: 187 Card: NNE
pulseCount: 0 revCount: 0 rps: 0 rpm: 0 miles/hour: 0
Heading: 187 Card: NNE
pulseCount: 0 revCount: 0 rps: 0 rpm: 0 miles/hour: 0
Heading: 187 Card: NNE
pulseCount: 0 revCount: 0 rps: 0 rpm: 0 miles/hour: 0
Heading: 112 Card: NNE
pulseCount: 0 revCount: 0 rps: 0 rpm: 0 miles/hour: 0
Heading: 112 Card: NNE
pulseCount: 0 revCount: 0 rps: 0 rpm: 0 miles/hour: 0
Heading: 112 Card: NNE
pulseCount: 0 revCount: 0 rps: 0 rpm: 0 miles/hour: 0
Heading: 112 Card: NNE
pulseCount: 0 revCount: 0 rps: 0 rpm: 0 miles/hour: 0
Heading: 112 Card: NNE
(“Card: NNE” is the cardinal wind direction, which is a just a placeholder in the code.)
So, I’m puzzled why the setup all of a suddenly stops taking an upload of new code – for some reason PlatformIO can’t access COM3 port for downloading even though it was working fine displaying stuff on the OLED screen.
Building .pio\build\d1_mini\firmware.bin
Creating BIN file “.pio\build\d1_mini\firmware.bin” using “C:\Users\bruce\.platformio\packages\framework-arduinoespressif8266\bootloaders\eboot\eboot.elf” and “.pio\build\d1_mini\firmware.elf”
Configuring upload protocol…
AVAILABLE: espota, esptool
CURRENT: upload_protocol = esptool
Looking for upload port…
Auto-detected: COM3
Uploading .pio\build\d1_mini\firmware.bin
esptool.py v3.0
Serial port COM3
Connecting…….._____….._____….._____….._____….._____
(Unplugged COM3 here)
File “C:\Users\bruce\.platformio\penv\lib\site-packages\serial\serialutil.py”, line 372, in timeout
self._reconfigure_port()
File “C:\Users\bruce\.platformio\penv\lib\site-packages\serial\serialwin32.py”, line 222, in _reconfigure_port
raise SerialException(
serial.serialutil.SerialException: Cannot configure port, something went wrong. Original message: PermissionError(13, ‘Access is denied.’, None, 5)
I did fiddle with the connector on the test jig to get it to work and didn’t touch it after I got it working. I disconnected the upload port (COM3), reconnected it, and that’s when it ceased to work…no display on the OLED, NOTHING! Hmmm. Tried to find a way to reset the COM3 port, but it doesn’t show up under Windows11. This is weird. In order to be able to upload code I have to disconnect the header connector from either end of the cable. And now the OLED is working…without the 034B test jig connected. How the heck are the connections to the test jig via a 10′ cable (D1 Mini D6, D7, and D8) affecting the serial port access???