New Problem of digital pins not working when using Blynk

All was working well, but my design stopped working after I rewired the thing up and soldered it tidely onto a board…

I think I connected 12V to the wrong leg of a transistor which may have sent 12V to a digital pin set on output…

Nothing appeared to work, so I pulled all of the connections out and started monitoring the digital pins voltages. They all appeared to be like 0.5V or so… Hmm thinking I had fried the arduino.

So I loaded a basic digital pin output sketch and checked all the digital pins voltages on high and low. Everything seemed OK. So thought maybe when I add digital inputs it becomes a problem. Yet again, no problem.

Load my sketch back up which is based on the Blynk read virtual pins and the digital voltages are low again. Pins that I know should be 5V (High) aren’t, and pins that should be low read 0.5V as well…

So I went through my code to see why, and if I delete " Blynk.begin(auth, wifi, ssid, pass);" from the sketch (the only thing deleted) the digital output and inputs work as expected.

Have I damaged my board? Could it just be the main microprocessor?

This worked fine before, so it’s not the sketch (not would I suspect bad code would make all digital pins behave weirdly) and removing only the line mentioned above fixes the sketch with nothing plugged into the arduino uno.

Do you have the correct board selected in the project?

What connection method are you using for the Arduino?

I’m using the same as I have always used when it was working. Nothing has changed as far as I know.

I am using an Arduino Uno with esp8266. I have arduino uno as the selected board in the arduino ide.

The sketch worked fine until I rewired the project. No change in my code. The esp was connecting and communicating just fine, well I could see it “online” in the Blynk app before and after the problem at least.

I am confused why removing that line fixes the digital pins… Could it be because it stops the serial connection when that line is removed which was causing problems for the digital pins (only after the rewiring or possible shorting of one of the pins)

Connection method? As in I’m using usb to upload the code?

You answered that question with your reference to ESP.

But what board have you selected in the Blynk app?

The Blynk app says esp8266 (WiFi)

That’s your problem, you need to select the Arduino board you are using.

Would that affect the digital pins though? I am struggling to see how. The ardiino digital pins don’t function as expected (measured with a meter) when that line of code above is in my sketch, remove it and all appears OK. It all worked fine before (digital inputs/outputs and logic turning led’s on etc) with that line included so the sketch was completely fine, and nothing has changed in the coding, board type in arduino uno, or in the Blynk app

For sure it would. The clever Blynk guys have mapped all the digital pins to all the different board types. You wouldn’t expect a Pi to work with Arduino pin mappings would you, same for declaring ESP when it’s actually an Arduino you are using.

I shoudl add that when I created the original sketch with the Blynk template thing, I chose the arduino uno as the board, with the esp8266 as the connection. Then kept that Auth token

That is fine but you must change from ESP to Uno in the app.

The only thing that I can see that has changed is the board due to a possible over voltage. I still find it strange why that particular line would affect the digital pins function (read with a volt meter with everything disconnected, as the scope is at work).

I am hoping someone can answer why, but suspect I may go buy another board in the morning…

Hopefully it fixes the problem, otherwise I can hear a “told you so” moment coming on by Costas :slight_smile:

Have you changed the board to Uno in the app or aren’t you going to bother?

I changed the board in the android app and put the new auth token into the sketch… But I have to hook the esp up again to get internet access (I pulled everything out when the digital pins started playing up)

Changed in the app and hooked up the esp. Nope nothing different.

Still thinking it might be a new board or chip

Hmmm. It seems to be working again with that line if code included so back to the original sketch (that had problems)…

Maybe something has reset, maybe I’ll run into this problem again as the board is temperamental or maybe I’ve made a silly mistake (but I check and checked, being very careful with everything disconnected)… Time to put it all back together in the morning and hope it works… Or maybe buy a new arduino just in case.

That fixed it for you.