Use this forum to chat about hardware specific topics for the ESP8266 (peripherals, memory, clocks, JTAG, programming)

User avatar
By Dika
#49529 Hello there..
These things, are new for me, like microcontroller, module, and etc.
Well, for the first, i search the code example. And i found it. But i wonder what does this code mean?
Code: Select allLAMP1=1
LAMP2=2
LAMP3=7
LAMP4=5
gpio.mode(LAMP1,gpio.OUTPUT)
gpio.mode(LAMP2,gpio.OUTPUT)
gpio.mode(LAMP3,gpio.OUTPUT)
gpio.mode(LAMP4,gpio.OUTPUT)
gpio.write(LAMP1,gpio.LOW)
gpio.write(LAMP2,gpio.LOW)
gpio.write(LAMP3,gpio.LOW)
gpio.write(LAMP4,gpio.LOW)


It seems the owner using esp8266-12, mine is esp8266-07.
Could someone explain to me what does that code?
specially these lines :
Code: Select allLAMP1=1
LAMP2=2
LAMP3=7
LAMP4=5

Many thanks :)
User avatar
By Mmiscool
#49567 specifying the pin numbers for each of the pins.
User avatar
By Dika
#49600 Hi Mmiscool..
Thanks for the answer. Still, not clear yet
From this code
Code: Select allLAMP1=1
LAMP2=2
LAMP3=7
LAMP4=5


Image
We got pin 1,2,7,5. But from esp8266-07 pinout, there is no such GPIO 7?.
Sorry for stupid question :)
Thanks
Last edited by Dika on Thu Jun 23, 2016 12:35 am, edited 1 time in total.
User avatar
By Mmiscool
#49635 gpio 7 is not broken out. was this code originally for a regular arduino?