Arduino en español
Circuitos con Arduino - Juan Antonio Villalpando
-- Tutorial de iniciación a Arduino --
Volver al índice del tutorial
____________________________
57_7.- Wireless módulo CH340 NodeMcu V3 ESP8266 Lua WIFI
- Este modulito es un NodeMCU que tiene el ESP8266, además ya tiene conexión directa mediante el chip CH340 a USB, tiene Wifi y muchos terminales.
- Es muy barato, cuesta unos 2,5 €
- Es recomendable que lo compres y estudies porque tiene futuro.
- Se puede utilizar sin usar el Arduino, simplemente se conecta mediante USB al ordenador y puedes programarlo y utilizar su entradas y salidas.
- Tiene muchos terminales GPIO que se pueden utilizar de entradas o salidas.
- Para programarlo puedes utilizar el mismo IDE de Arduino, preferiblemente uno de tipo IDE 1.6.X
- ¿Y si tuviera que elegir uno cual compraría?
- Este: http://es.aliexpress.com/item/V3-Wireless-module-NodeMcu-4M-bytes-Lua-WIFI-Internet-of-Things-development-board-based-ESP8266-for/32460412205.html
________________________________________________
Códigos.
- Cargamos el IDE 1.6.7 del Arduino.
- Vamos a Herramientas y establecemos la Placa "NodeMCU 1.0 (ESP-12E Module)"
- [Si tienes problemas échale un vistazo al tutorial... 57modulowifi_3.htm]
- Vamos a Ejemplos / ESP8266 y cargamos el Blink
- Fíjate que el LED integrado en la plaquita del NodeMCU se reconoce en el código como BUILTIN_LED. (Sería como el LED13 de Arduino).
Código
|
/*
ESP8266 Blink by Simon Peter
Blink the blue LED on the ESP-01 module
This example code is in the public domain
The blue LED on the ESP-01 module is connected to GPIO1
(which is also the TXD pin; so we cannot use Serial.print() at the same time)
Note that this sketch uses BUILTIN_LED to find the pin with the internal LED
*/
void setup() {
pinMode(BUILTIN_LED, OUTPUT); // Initialize the BUILTIN_LED pin as an output
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(BUILTIN_LED, LOW); // Turn the LED on (Note that LOW is the voltage level
// but actually the LED is on; this is because
// it is acive low on the ESP-01)
delay(1000); // Wait for a second
digitalWrite(BUILTIN_LED, HIGH); // Turn the LED off by making the voltage HIGH
delay(2000); // Wait for two seconds (to demonstrate the active low LED)
} |
- En la parte de Ejemplos del IDE de Arduino puedes encontrar otros códigos de Wifi.
________________________________
|