NodeMCU is crashing after a API call

Hi,

I have a very annoying problem, when i try to do a update request to the API on a specific PIN my whole NodeMCU sort of crashes (Diagnosed in the Serieal Monitor) very strange. When i try to trigger PIN in the app it just works fine without any problem. The update request that i make is just standard how it’s been documented in the API docs. I have tried so many things, can anyone help me?

What code are you running on the NodeMCU, and what do you see in the serial monitor?

Pete.

What pin, what value are you sending it and what is hooked up to that pin?

And what is the error message?

All important details.

I connected pin D8, after a API put request i see the device restarting so there is literally no error message just a reboot of the NodeMCU. That’s the weird thing.

D8 (GPIO 15 - the prefered way to reference pins in the IDE) is a semi special pin that needs to be set LOW during boot (it has a built in pulldown)… change it to one of the “safe” pins for general use…

Like GPIO 4 or 5

Just the normal really plain Blynk code so nothing special, what i see in the serial is just the normal messages that the device is connected to the API. So what i replied to Gunner is no strange errors just a weird reboot of the nodeMCU after a API request.

There should be something upon boot showing what caused the last reset/crash… Please post the entire Serial Monitor printout from Boot.

Also, what is it you are triggering on that pin?.. and are you triggering it HIGH or LOW?

Haha, omg i’m going to try this when i have some time. I’m such a scrub :stuck_out_tongue:
Thank you Gunner, i will let you know if it worked!

Nope doesn’t work either :frowning: It’s so strange because when i turn on PIN D2 (GPIO 4) what you said in the Blynk app i works flawless, but when i try to make a API request like: http://blynk-cloud.com/my_token/update/D2?value=1 it crashes the NodeMCU what i said earlier so strange. :sweat:

@teumaas not sure if it’s already been covered in this thread but I think if you want GPIO 4 then it is D4 (not D2) in the API call.

1 Like

@teumaas I hope you didn’t get confused in that last post… I know this and I still get tossed about by it (I always use vPins, so often forget this fact)…

Please note, the D in the API usage is a reference to “Digital”, not to be confused with the silkscreened Dx designation. The number used is still the same GPIO number not the silkscreened one

What a crazy world :crazy_face:

1 Like

Thanks for the response! but i already solved it by writing my own ExpressJS api, there i connected my NodeMCU with. So yeah thanks again for the help.