I'm not even able to put a pin on high

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
guz
Normal user
Posts: 10
Joined: 04 Sep 2016, 21:50

I'm not even able to put a pin on high

#1 Post by guz » 04 Sep 2016, 22:57

I have a lolin v3 dev board(ESP-12E) like this one Image
with espeasy_r120.
I had put a led between D4 and GND
I'm tryin some http command to light up the led, but nothing happens.
The led remain low.
http://192.168.43.245/control?cmd=gpio,4,1
{
"log": "GPIO 4 Set to 1",
"plugin": 1,
"pin": 4,
"mode": "output",
"state": 1
}

http://192.168.43.245/control?cmd=Pulse,4,1,2000
{
"log": "GPIO 4 Pulsed for 2000 mS",
"plugin": 1,
"pin": 4,
"mode": "output",
"state": 1
}

and so on...

The led isn't broken because if I connect it to the 3.3v and GND it works.
Do I have to setup some other parameters? In hardware tab I try to set gpio4 to output high, output low, input, default, but it seems that it doesn't do anything...
please help me

User avatar
costo
Normal user
Posts: 500
Joined: 21 Nov 2015, 15:03
Location: NL, zw-NB

Re: I'm not even able to put a pin on high

#2 Post by costo » 05 Sep 2016, 12:50

That is a classic mistake. You think D4 is the same as GPIO4 but it is not.
The GPIOx names are related to the actual pins on the ESP8266 chip itself while names like D0, D1 etc are names related to the pins of the lolin board.

If you google on [ esp8266 lolin ] and look for pictures you see which GPIO is connected to which NodeMCU pin.

guz
Normal user
Posts: 10
Joined: 04 Sep 2016, 21:50

Re: I'm not even able to put a pin on high

#3 Post by guz » 05 Sep 2016, 16:44

Actually I saw that in arduino ide I need to call pin as D0,D1 ecc, but if i try to call
http://192.168.43.156/control?cmd=gpio,D4,1 espeasy gives to D4 a value of 0

{
"log": "GPIO 0 Set to 1",
"plugin": 1,
"pin": 0,
"mode": "output",
"state": 1
}

I think that I have to recompile the espeasy code, but I'm not able to make changes to the code.
Can someone help me?

spaceguard
New user
Posts: 6
Joined: 26 Mar 2016, 17:08

Re: I'm not even able to put a pin on high

#4 Post by spaceguard » 05 Sep 2016, 17:28


guz
Normal user
Posts: 10
Joined: 04 Sep 2016, 21:50

Re: I'm not even able to put a pin on high

#5 Post by guz » 05 Sep 2016, 18:14

It works great.
Many thanks to all

Post Reply

Who is online

Users browsing this forum: No registered users and 34 guests