Rotary encoder/NodeMCU - cannot upload while 3V3 connected
Posted: Sat Jan 30, 2021 9:23 pm
I have been playing with a rotary encoder and a NodeMCU. I have connected the three data pins of the rotary encoder to D6, D7 and D8 and the + and GND pins to 3V3 and GND on the NodeMCU. When the example code is uploaded everything works as it should.
However, I can only upload the code if I disconnect the the jumper connecting + to 3V3 on the NodeMCU first. I then have to reconnect it actually to use the uploaded sketch.
I am using the current version of the Arduino IDE 1.8.13 and all the boards and libraries are up-to-date. I have tried this on both my MacBook Pro and on a Chromebook using a Debian container and the behaviour is the same for both. I've also tried pressing the flash button at the time I plug the NodeMCU in, holding it all the time I'm trying to flash and pressing rst and flash at the same time then releasing rst first then flash. None of that made any difference.
Am I doing something wrong or is there a way round this? It's a bit of a pain having to keep plugging and unplugging the jumper and if I actually made something using the rotary encoder I'd have to desolder wires just to re-flash and I'm sure that cannot be intended behaviour.
[Edit]
I have also tried a different NodeMCU clone using a different cable on an Ubuntu laptop with a fresh installation of the Arduino IDE (plus ESP8266 board etc.). The behaviour was identical.
I wanted to see whether I was actually entering flash mode so I tried setting the speed to 74880 so I could read the boot message but it refused, giving the following error message:
Setting other speeds such as 9600 or 115200 did not result in any error messages. Again, this behaviour was consistent across all the devices I tried.
However, I can only upload the code if I disconnect the the jumper connecting + to 3V3 on the NodeMCU first. I then have to reconnect it actually to use the uploaded sketch.
I am using the current version of the Arduino IDE 1.8.13 and all the boards and libraries are up-to-date. I have tried this on both my MacBook Pro and on a Chromebook using a Debian container and the behaviour is the same for both. I've also tried pressing the flash button at the time I plug the NodeMCU in, holding it all the time I'm trying to flash and pressing rst and flash at the same time then releasing rst first then flash. None of that made any difference.
Am I doing something wrong or is there a way round this? It's a bit of a pain having to keep plugging and unplugging the jumper and if I actually made something using the rotary encoder I'd have to desolder wires just to re-flash and I'm sure that cannot be intended behaviour.
[Edit]
I have also tried a different NodeMCU clone using a different cable on an Ubuntu laptop with a fresh installation of the Arduino IDE (plus ESP8266 board etc.). The behaviour was identical.
I wanted to see whether I was actually entering flash mode so I tried setting the speed to 74880 so I could read the boot message but it refused, giving the following error message:
Code: Select all
Error while setting serial port parameters: 74,880 N 8 1
Setting other speeds such as 9600 or 115200 did not result in any error messages. Again, this behaviour was consistent across all the devices I tried.