avatarJ3

Free AI web copilot to create summaries, insights and extended knowledge, download it at here

1486

Abstract

exels.com/tr-tr/fotograf/dagin-onune-bulutlu-gokyuzu-altinda-yanas-206359/">Pixabay</a> on<a href="https://www.pexels.com/tr-tr/"> Pexels</a></figcaption></figure><h2 id="68cb">6-“If the water is calm, the boat is also calm! If your thoughts are calm, your life is also calm!” ― Mehmet Murat ildan</h2><h2 id="470e">7- “The nearer a man comes to a calm mind the closer he is to strength”</h2><h2 id="032a">— Marcus Aurelius</h2><h2 id="7b19">8-“When you make peace with yourself, you make peace with the world.”</h2><h2 id="3e44">— Maha Ghosananda</h2><h2 id="8c7d">9- “Life is not a problem to be solved, but a reality to be experienced.”</h2><h2 id="63ef">— Soren Kierkegaard</h2><h2 id="a353">10-“In three words I can sum up everything I’ve learned about life: It goes on.”</h2><h2 id="dbf7">―Robert Frost</h2><h1 id="3b9e">Final thoughts</h1><p id="76f6">Today I’ve shared with you <b>10 powerful quotes to calm your mind.</b></p><p id="2cd3">Thank you for reading.</p><p id="8300">-E.K.</p><div id="1747" class="link-block"> <a href="https://readmedium.com/for-people-who-rely-on-their-emotions-to-guide-them-through-life-d18f791686cf"> <div> <div> <h2>For People Who Rely on Their Emotions To Guide Them Through Life</h2> <div><h3>And a recipe to lead your emotions rather than being led by them</h3></div> <div><p>medium.com</p></div> </div> <div> <di

Options

v style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/1*HwlNVhvosvncwquAjgtHCw.jpeg)"></div> </div> </div> </a> </div><div id="01de" class="link-block"> <a href="https://readmedium.com/3-simple-tricks-to-get-out-of-your-head-and-enjoy-the-moment-instead-3851ace89a0b"> <div> <div> <h2>3 Simple Tricks To Get Out of Your Head, and Enjoy the Moment Instead</h2> <div><h3>A recipe for a mindful way of life</h3></div> <div><p>medium.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/1*YfPfRa5FHD7pWdWpufe10A.jpeg)"></div> </div> </div> </a> </div><div id="5b93" class="link-block"> <a href="https://readmedium.com/10-quotes-to-remind-you-not-to-take-life-too-seriously-26eba5327ecc"> <div> <div> <h2>10 Quotes To Remind You Not To Take Life Too Seriously</h2> <div><h3>A recipe to enjoy life to the fullest</h3></div> <div><p>medium.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/1*gwYpimNC0CFGuR1DjLdbMg.jpeg)"></div> </div> </div> </a> </div></article></body>

Your First NodeMCU/Lua Script Flash on ESP8266!!!

Let’s get our feet wet with NodeMCU/Lua and sees what happens !!- #arduSerie 20

Investigating Options Available

I’m just experiencing the ESP8266 few options offered for my home automation project. This firmware is much commented on the net, so I decided to test it at my own risk.

Here we’re Go!!!

Step 00 — Prepare The Software!!!

Download the NodeMCU-flasher from https://github.com/nodemcu/nodemcu-flasher/tree/master/Win64/Release Extract and execute it!!!

Cool!!!

Now get the firmware from https://github.com/nodemcu/nodemcu-firmware/releases.

Step 01 -Prepare The Hardware!!!

Let's go ahead!!!

The necessary hardware:

3 x 10kΩ Resistors
1 x 1 kΩ Resistor
1 x 330Ω Resistor
1 x 47 uF Electrolitic Capacitor
1 x 5 mm LED
1 x ESP8266 Board (ESP01)
1 x Arduino UNO
1 x Breadboard 400 holes or bigger
Some Wire Jump (please, notice the by-pass black wire)
A bit of pacience:)

Here is the schematic:

To flash a new firmware to ESP8266 you need to boot the ESP8266 in the upload mode and write new firmware, NodeMCU.

Let's started by just connect GPIO0 to GND for upload mode and start flashing.

All hardware configurations are the same as my previous video. Watch it if you have any questions !!

Step 02 — Flash To ESP8266!!!

A great working tool for hobbyist play with esp8266 is ESPlorer. ESPlorer? Integrated Development Environment (IDE) for ESP8266 developers. The essential multi-platforms tools for any ESP8266 developer from Lua tool author’s, including an LUA for NodeMCU and MicroPython. Also, AT commands are supported. Required JAVA (SE version 7 and above) installed.

Step 03 — Run It!!!

ESPlorer lets you run scripts, upload files, run snippets and do a bunch of other useful things with your ESP8266.

Run the application and copy this code. We will turn on/off the light of the LED on the breadboard!

Here is the code:

lighton=0
pin=4
gpio.mode(pin,gpio.OUTPUT)            -- Assign GPIO to Output
tmr.alarm(1,500,1,function()
    if lighton==0 then
        lighton=1
        gpio.write(pin,gpio.HIGH)     -- Assign GPIO On
    else
        lighton=0
         gpio.write(pin,gpio.LOW)     -- Assign GPIO off
    end
end)

Simple right? just to become familiar with NodeMCU and Lua.

Click on the ‘Send To ESP’ button on Hurray!!! Led flashing!!!

Here is the video:

BTW, What is Lua?

Lua is a powerful, efficient, lightweight, embeddable scripting language. It supports procedural programming, object-oriented programming, functional programming, data-driven programming, and data description.

Where does Lua come from?

Lua is designed, implemented, and maintained by a team at PUC-Rio, the Pontifical Catholic University of Rio de Janeiro in Brazil.

Lua is powerful (but simple)!!!

Lua is small!!!

Lua is free!!!

There you go!!!

Till the next episode of #arduSerie!!!

Bye o/

Credits & References:

The book Programming in Lua The first edition is freely available online

A Look at the Design of Lua by vimeo.com

A Look at the Design of Lua by cacm.acm.org

Lua is featured in the latest issue of Communications of ACM magazine by PUC-RIO

NodeMCU: Connect Things EASY by nodemcu.com

Lua by lua.org

ESPlorer by esp.ru

NodeMCU by Github

14core: Running Lua by 14core

Espressif by espressif.com

4 reasons I abandoned NodeMCU/Lua for ESP8266

Download All Project Archives

Related Posts

Arduino Headless Setup & ESP8266 (WIFI cheap chip!) — Rather Stunning MCU!!! — #arduSerie 16

Flashing The Official ESPRESSIF Firmware in ESP8266 !!! — Easy ESP8266 Flashing!!! — #arduSerie 17

Get Started Using AT Commands w/ ESP8266 — Multiple Connection as TCP Server — #arduSerie 19

Your First NodeMCU/Lua Script Flash on ESP8266!!! — Let’s get our feet wet with NodeMCU/Lua and sees what happens !!- #arduSerie 20

  • Edited @ jan2019 — Grammar corrections w/ Grammarly — Send me a comment, please:)
  • Edited @ Dez2020 — BOM and some text corrections, reference added :)
IoT
Esp8266
Flash Firmware
Nodemcu
Lua
Recommended from ReadMedium