NodeMCU v2: Difference between revisions

From Nottinghack Wiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
 
(21 intermediate revisions by 3 users not shown)
Line 1: Line 1:
[[Category:Projects]]
[[Category:Michael's Projects]]


ESP8266 development board for wifi
{{Project
|name=NodeMCU v2
|primary=[[User:Msemtd|Michael Erskine]]
|created=03/03/2016
|status=In Progress
|type=member
}}


So I sent off to China for a NodeMCU board (for about £3) thinking that it might be fun to have something that talks over wifi, then forgot all about it. When it arrived in the post yesterday I wondered how I use it! I plugged it into a Windows 7 development PC with the micro USB and Windows went off and installed the CP2102 UART bridge driver. So then it presented itself as a serial port in the Windows Device Manager. I pointed a terminal at it (the free and relatively open Teraterm Pro) and after some faffing worked out it wanted a 115k baudrate. A little web searching revealed that it is expecting AT commands and there's a magic command "AT+GMR" - Cool!
ESP8266 development board for wifi --[[User:Msemtd|Michael Erskine]] ([[User talk:Msemtd|talk]]) 13:39, 3 March 2016 (UTC)


So I sent off to China for a NodeMCU board (for £3.55 from http://www.ebay.co.uk/itm/291505733201 at time of writing) thinking that it might be fun to have something that talks over wifi, then forgot all about it. When it arrived in the post yesterday I wondered how I use it! I plugged it into a Windows 7 development PC with the micro USB and Windows went off and installed the CP2102 UART bridge driver. So then it presented itself as a serial port in the Windows Device Manager. I pointed a terminal at it (the free and relatively open Teraterm Pro) and after some faffing worked out it wanted a 115k baudrate. A little web searching revealed that it is expecting AT commands and there's a magic command "AT+GMR" - Cool!
    AT+GMR
    AT version:0.40.0.0(Aug  8 2015 14:45:58)
    SDK version:1.3.0
    Ai-Thinker Technology Co.,Ltd.
    Build:1.3.0.2 Sep 11 2015 11:48:04
    OK
But how do I load a LUA script onto it? The NodeMCU website says nowt, so a bit of web searching and it seems that Arduino IDE can be used - very cool!
* http://esp8266.github.io/Arduino/versions/2.1.0/doc/installing.html
The Boards Manager within recent Arduino releases takes care of the installation of toolchains and whatever magic that Arduino needs. It downloaded a metric shedload of stuff (153,527kb of who-knows-what!) and then...
* http://nodemcu.readthedocs.org/en/dev/en/
    AT+RST
    OK
    ets Jan  8 2013,rst cause:2, boot mode:(3,6)
    load 0x40100000, len 1396, room 16
    tail 4
    chksum 0x89
    load 0x3ffe8000, len 776, room 4
    tail 4
    chksum 0xe8
    load 0x3ffe8308, len 540, room 4
    tail 8
    chksum 0xc0
    csum 0xc0
    2nd boot version : 1.4(b1)
      SPI Speed      : 40MHz
      SPI Mode      : DIO
      SPI Flash Size & Map: 8Mbit(512KB+512KB)
    jump to run user1 @ 1000
    n't use rtc mem data
    rl?�?n�dÿ
    Ai-Thinker Technology Co.,Ltd.
    ready
    WIFI DISCONNECT
     AT+GMR
     AT+GMR
     AT version:0.40.0.0(Aug  8 2015 14:45:58)
     AT version:0.40.0.0(Aug  8 2015 14:45:58)
     SDK version:1.3.0
     SDK version:1.3.0
Line 10: Line 62:
     Build:1.3.0.2 Sep 11 2015 11:48:04
     Build:1.3.0.2 Sep 11 2015 11:48:04
     OK
     OK
So in trying to use ESPlorer to send LUA command line commands I just get lots of errors but the AT commands work fine. So I'm thinking that a firmware update might save it. Not knowing what I actually have bought is a bit of a problem! There some comparisons here:
http://frightanic.com/iot/comparison-of-esp8266-nodemcu-development-boards/
    2nd generation / v1.0 / V2
    The V2 fixes the short comings of the initial board, it’s more narrow and fits nicely into bread boards. The chip was upgraded from a ESP-12 to a ESP-12E.




Line 17: Line 76:
* https://www.coolcomponents.co.uk/nodemcu-v2-lua-based-esp8266-development-kit.html
* https://www.coolcomponents.co.uk/nodemcu-v2-lua-based-esp8266-development-kit.html
* http://www.seeedstudio.com/recipe/index.php?controller=recipe&action=show&recipe_id=232&ref=product
* http://www.seeedstudio.com/recipe/index.php?controller=recipe&action=show&recipe_id=232&ref=product
= First Jiffy Programs =
Using the Arduino core: -
* Using Arduino 1.6.5, I added support for the nodemcu with the Boards Manager...
<gallery>
File:Nodemcu-ard-boardsman.png
</gallery>
* documentation for the ESP8266 Arduino Core is at...
** http://esp8266.github.io/Arduino/versions/2.0.0/
* Not 100% sure how many digital IO pins I can use - they seem to clash with all sorts of peripherals:
** see http://esp8266.github.io/Arduino/versions/2.0.0/doc/reference.html#digital-io
** pragmatic approach is suck-it-and-see!
== First Project: Status Boards ==
* Project [[Status_Boards]]
* See my GitHub project at https://github.com/msemtd/nodemcu-statusboard
* NodeJS server dishing up the info
* in theory this allows scaling to any number of feeds and boards
== Second Project: WiFi-enabled Banjo ==
* Toby's LED banjo needs to host its own webserver, and perhaps its own WiFi hotspot
** project page here: [[WiFi-enabled Banjo]]
** We are riding the ESP8266 [https://en.wikipedia.org/wiki/Hype_cycle Hype-Cycle] until the wheels fall off!
** ESP8266 Captive Portal https://www.hackster.io/rayburne/esp8266-captive-portal-5798ff
Possible uses for said WiFi hotspot...
* Change colour of lights.
* Provide a link to our soundclound page.
* Piratebox
* Livestreaming from a microphone or small camera located inside banjo. Or pointed at the audience.
* Rickrolling
* Something that fucks with the people at Makerfaire in some way.
* Tiny smoke machine

Latest revision as of 15:56, 5 February 2019


NodeMCU v2
[[{{{image}}}|border|frameless|220px|center]]
Primary Contact Michael Erskine
Created 03/03/2016
Completed {{{completeddate}}}
Dormant {{{dormantdate}}}
Version {{{version}}}
Members {{{members}}}
Manufacturer {{{manufacturer}}}
Model {{{model}}}
Location [[{{{location}}}]]
GitHub / Repo {{{repo}}}
Status In Progress
Type Members Project
Live Status {{{livestatus}}}
QR code

ESP8266 development board for wifi --Michael Erskine (talk) 13:39, 3 March 2016 (UTC)

So I sent off to China for a NodeMCU board (for £3.55 from http://www.ebay.co.uk/itm/291505733201 at time of writing) thinking that it might be fun to have something that talks over wifi, then forgot all about it. When it arrived in the post yesterday I wondered how I use it! I plugged it into a Windows 7 development PC with the micro USB and Windows went off and installed the CP2102 UART bridge driver. So then it presented itself as a serial port in the Windows Device Manager. I pointed a terminal at it (the free and relatively open Teraterm Pro) and after some faffing worked out it wanted a 115k baudrate. A little web searching revealed that it is expecting AT commands and there's a magic command "AT+GMR" - Cool!

   AT+GMR
   AT version:0.40.0.0(Aug  8 2015 14:45:58)
   SDK version:1.3.0
   Ai-Thinker Technology Co.,Ltd.
   Build:1.3.0.2 Sep 11 2015 11:48:04
   OK

But how do I load a LUA script onto it? The NodeMCU website says nowt, so a bit of web searching and it seems that Arduino IDE can be used - very cool!

The Boards Manager within recent Arduino releases takes care of the installation of toolchains and whatever magic that Arduino needs. It downloaded a metric shedload of stuff (153,527kb of who-knows-what!) and then...

   AT+RST
   OK
    ets Jan  8 2013,rst cause:2, boot mode:(3,6)
   load 0x40100000, len 1396, room 16 
   tail 4
   chksum 0x89
   load 0x3ffe8000, len 776, room 4 
   tail 4
   chksum 0xe8
   load 0x3ffe8308, len 540, room 4 
   tail 8
   chksum 0xc0
   csum 0xc0
   2nd boot version : 1.4(b1)
     SPI Speed      : 40MHz
     SPI Mode       : DIO
     SPI Flash Size & Map: 8Mbit(512KB+512KB)
   jump to run user1 @ 1000
   n't use rtc mem data
   rl?�?n�dÿ
   Ai-Thinker Technology Co.,Ltd.
   ready
   WIFI DISCONNECT
   AT+GMR
   AT version:0.40.0.0(Aug  8 2015 14:45:58)
   SDK version:1.3.0
   Ai-Thinker Technology Co.,Ltd.
   Build:1.3.0.2 Sep 11 2015 11:48:04
   OK

So in trying to use ESPlorer to send LUA command line commands I just get lots of errors but the AT commands work fine. So I'm thinking that a firmware update might save it. Not knowing what I actually have bought is a bit of a problem! There some comparisons here: http://frightanic.com/iot/comparison-of-esp8266-nodemcu-development-boards/

   2nd generation / v1.0 / V2
   The V2 fixes the short comings of the initial board, it’s more narrow and fits nicely into bread boards. The chip was upgraded from a ESP-12 to a ESP-12E.


Links

First Jiffy Programs

Using the Arduino core: -

  • Using Arduino 1.6.5, I added support for the nodemcu with the Boards Manager...

First Project: Status Boards

Second Project: WiFi-enabled Banjo

Possible uses for said WiFi hotspot...

  • Change colour of lights.
  • Provide a link to our soundclound page.
  • Piratebox
  • Livestreaming from a microphone or small camera located inside banjo. Or pointed at the audience.
  • Rickrolling
  • Something that fucks with the people at Makerfaire in some way.
  • Tiny smoke machine