-->
Page 1 of 1

Just starting out

PostPosted: Thu Mar 03, 2016 10:47 am
by Darkeligos
Hi everyone!

I'm relatively new to the Arduino scene, and have recently had my eye on the ESP8266, more specifically the Wemos D1 mini. I've done quite a bit of programming in my time, so I should be able to understand some of the answers you guys might be able to help me with. The world of ESPs looks really confusing from the outside, since there is a whole community dedicated to writing/maintaining not only code but firmware as well.

Firmware/code-wise, how does the ESP8266 work? I understand that NodeMCU is what runs the ESP, but is there any difference between the firmware that runs the ESP and the code that I can push to it? Are both languages the same? Both LUA? When I push code to the ESP, am I basically modifying the 'OS' or firmware or does the ESP firmware just interpret my code?

Thanks!

Re: Just starting out

PostPosted: Mon Mar 07, 2016 10:25 pm
by Darkeligos
I think I'm starting to understand more. NodeMCU will now interpret my code that I push to the device. However, I'm still not certain of the languages used. Can an ESP8266 be used as its own microcontroller; controlling devices and reading inputs of other sensors?

Re: Just starting out

PostPosted: Mon Mar 07, 2016 11:32 pm
by Mmiscool
The esp module whether it is an esp-01 or an esp-12, node mcu ect. is a microcontroller. GPIO can be used to control things and read sensors. I2c can be used. One wire temperature sensors. SPI. Serial. and analog input.

I recommend a node mcu as they have a usb to serial converter built in.

You can program them just like an arduino with the arduino ide by installing the esp package from the boards manager. In this way writing your own firmware.

You can also upload other firmware such as the node mcu lua interpreter, javascript interpreter, python interpreter or basic interpreter.

On a normal esp module there is a esp8266 chip and a flash memory chip. The esp8266 has no internal storage so code is stored on the flash chip. The esp8266 will load this code and execute it on boot.

To program with the arduino environment you must ground gpio 0 (On the node mcu there is a button for this) and restart the module. This puts the device in flashing mode. You can upload firmware or arduino sketches in this way.

If you have an esp-01 you can use the following guide to learn how to flash it. The same instructions will if you want to program it with the arduino ide.
http://www.esp8266basic.com/flashing-instructions.html
the circuit in the picture shows how to use a regular arduino board as a usb to serial converter and how to put the esp in to flashing mode.

Information about the arduino ide set up is here
https://github.com/esp8266/Arduino

yu must install the esp package using the boards manager.

Re: Just starting out

PostPosted: Tue Mar 08, 2016 2:19 pm
by Darkeligos
Mmiscool wrote:The esp module whether it is an esp-01 or an esp-12, node mcu ect. is a microcontroller. GPIO can be used to control things and read sensors. I2c can be used. One wire temperature sensors. SPI. Serial. and analog input.

...


Thanks for the reply. As you can work with javascript, is it possible to work with Node.JS on these devices? As the D1 Mini has (I believe) 4MB of flash, I have some wiggle room with interpreters/languages. What way do you think is simplest to create socket connections between ESPs? Is there threading capabilities so I can run a web server while also getting responses from other ESPs?