Перейти к содержимому

Как подключить nodemcu к arduino ide

  • автор:

Настройка Arduino IDE для NodeMCU

NodeMCU — это популярная и очень удобная платформа на основе WiFi модуля ESP-8266. По сути, NodeMCU представляет собой плату, на которой размещены: сам модуль ESP-8266, стабилизатор напряжения и USB-UART мост.

NodeMCU

Существуют разные версии ESP8266, но почти для всех используется один и тот же способ настройки среды разработки Arduino IDE. О том, как, собственно, сделать эту настройку и пойдет речь в статье.

Настройка ESP8266 в Arduino IDE

Для этой процедуры необходим доступ в интернет, так как Arduino IDE требуется скачать дополнительные пакеты.

Arduino IDE настройка NodeMcu

В поле Дополнительные ссылки для Менеджера плат пишем такую ссылку:

Arduino IDE настройка NodeMcu

Arduino IDE настройка NodeMcu

В самом низу будет нужный нам пакет «esp8266 by ESP8266

Arduino IDE настройка NodeMcu

Жмём кнопку Установить.

Arduino IDE настройка NodeMcu

Спустя некоторое время пакет скопирует необходимые файлы и в Arduino IDE можно будет выбрать нужную нам плату.

Подключение светодиода к NodeMCU

В качестве примера, подключим к NodeMCU светодиод и напишем программу, которая будет включать и выключать его с периодом в одну секунду.

Для начала посмотрим на схемы выводов NodeMCU.

NodeMCU распиновка схема выводов

Плата имеет 13 цифровых выводов, обозначенных аббревиатурой GPIO. Можем подключить светодиод к любому из них. Пусть это будет вывод D7 (он же GPIO13).

Принципиальная схема

Подключение светодиода к NodeMCU

Внешний вид макета

Подключение светодиода к NodeMCU

NodeMCU работает с напряжением 3.3 Вольта, так что для подключения красного светодиода нам потребуется использовать токозадающий резистор с сопротивлением 65 Ом. Но подойдет и распространенный резистор 200 Ом.

Загрузка программы на NodeMCU с помощью Arduino IDE

Теперь, когда Arduino IDE умеет работать с NodeMCU и светодиод подключен, попробуем загрузить первую программу.

В меню «Инструменты/Плата» выбираем NodeMCU 1.0.

Arduino IDE настройка NodeMcu

const byte ledPin = 13; void setup() < pinMode(ledPin, OUTPUT); >void loop()

Загружаем программу на NodeMCU, смотрим на светодиод ��

Заключение

В следующей статье поговорим о том, как создать простейший веб-сервер на базе NodeMCU (да и вообще на любой ESP8266), который позволит нам через WiFi управлять любыми устройствами.

How to Program NodeMCU on Arduino IDE

license

Introduction: How to Program NodeMCU on Arduino IDE

osoyooproduct

By osoyooproduct Follow

More by the author:

Arduino Bluetooth Obstacle Avoidance Line Follower IR Remote Robot Projects 2023

Assemble OSOYOO Model-3 Robot Car for Arduino

OSOYOO Yun IoT Smart Home Kit

About: Osoyoo brand products are mainly focused on STEM education.User experience and customer feeling are always our first priority. Our goal is to create the best designed product to help students and hobbyist to e… More About osoyooproduct »

The Osoyoo NodeMCU comes pre-programmed with Lua interpretter, but you don’t have to use it! Instead, you can use the Arduino IDE which may be a great starting point for Arduino lovers to familiarize themselves with the technologies surrounding the IoT.Note that when you use the NodeMCU board with the Arduino IDE ,it will write directly to the firmware, erasing the NodeMCU firmware.So if you want to back to Lua SDK,use the “flasher” to re-install the firmware.

The NodeMCU programming can be as easy as in Arduino,the main difference is the distribution of pins in the nodemcu board.Following below operations and enjoy your first NodeMCU & Arduino IDE travel!

Add Tip Ask Question Comment Download

Step 1: Connect Your NodeMCU to the Computer

Use the USB cable to connect your NodeMCU to the computer,you will see the blue onboard LED flicker when powered up, but they will not stay lit.

Add Tip Ask Question Comment Download

Step 2: Install the COM/Serial Port Driver

In order to upload code to the ESP8266 and use the serial console, connect any data-capable micro USB cable to ESP8266 IOT Board and the other side to your computer’s USB port.

The new version NodeMCUv1.0 comes with the CP2102 serial chip,you can download and install the driver from:https://www.silabs.com/products/development-tools/. . The NodeMCUv0.9 comes with the CH340 serial chip,you can download and install the driver from:https://github.com/nodemcu/nodemcu-devkit/tree/mas.

Add Tip Ask Question Comment Download

Step 3: ​Install the Arduino IDE 1.6.4 or Greater

Download Arduino IDE from Arduino.cc (1.6.4 or greater) – don’t use 1.6.2! You can use your existing IDE if you have already installed it. You can also try downloading the ready-to-go package from the ESP8266-Arduino project, if the proxy is giving you problems

Add Tip Ask Question Comment Download

Step 4: ​Install the ESP8266 Board Package

Enter http://arduino.esp8266.com/stable/package_esp8266. into Additional Board Manager URLs field in the Arduino v1.6.4+ preferences (Open Arduino IDE–>File–>Perferences–>Settings). Enter the link and click “OK” to save your changes. Next, use the Board Manager to install the ESP8266 package Enter the Boards Manager and find the board type as below: Scroll the Broads Manager screen down to the bottom, you will see A module called “esp8266 by esp8266 Community” (see following picture), select the latest version and click “Install“. The ESP8266 package has benn installed successfully. Note: You’d better close the Arduino IDE and restart it again.

Add Tip Ask Question Comment Download

Step 5: Setup ESP8266 Support

When you’ve restarted, select NodeMCU 0.9 (or NodeMCU 1.0) from the Tools->Board dropdown Config the Board menu and choose the right Port for your device. CPU Frequency:80MHz,Flash Size:4M(3M SPIFFS),Upload Speed:115200 Now just proceed as the Arduino: Start your sketching! Note: 115200 baud upload speed is a good place to start – later on you can try higher speeds but 115200 is a good safe place to start.

Add Tip Ask Question Comment Download

1 Person Made This Project!

  • How to Program NodeMCU on Arduino IDE

Did you make this project? Share it with us!

Recommendations

Fear Booth - Raspberry Pi Powered Photo Booth With a Spooky Twist

Fear Booth — Raspberry Pi Powered Photo Booth With a Spooky Twist by Görkem in Raspberry Pi

The Ultimate Camera RIG With Portable Display

The Ultimate Camera RIG With Portable Display by Arnov Sharma in Cameras

Pi-lomar - 3D Printed Working Miniature Observatory Using Raspberry Pi

Pi-lomar — 3D Printed Working Miniature Observatory Using Raspberry Pi by MattHh in Raspberry Pi

DIY World Clock

DIY World Clock by Create_With_Arjun in Clocks

Project-Based Learning Contest

Project-Based Learning Contest

Make Some Noise Contest

Make Some Noise Contest

Jewelry Contest

Jewelry Contest

10 Comments

riadavid_29

Reply Upvote

cant find nodemcu anywhere in the board manager

AbhinavS104

Question 5 years ago on Step 5

Answer Upvote

I am trying to install nodemcu on arduino. I am getting the following error: please help

package_index.json file signature verification failed

java.lang.RuntimeException: cc.arduino.contributions.SignatureVerificationFailedException: package_index.json file signature verification failed

Caused by: cc.arduino.contributions.SignatureVerificationFailedException: package_index.json file signature verification failed

Saved searches

Use saved searches to filter your results more quickly

Cancel Create saved search

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

esp8266 / Arduino Public

ESP8266 core for Arduino

License

esp8266/Arduino

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Switch branches/tags
Branches Tags
Could not load branches
Nothing to show
Could not load tags
Nothing to show

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Cancel Create

  • Local
  • Codespaces

HTTPS GitHub CLI
Use Git or checkout with SVN using the web URL.
Work fast with our official CLI. Learn more about the CLI.

Sign In Required

Please sign in to use Codespaces.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching Xcode

If nothing happens, download Xcode and try again.

Launching Visual Studio Code

Your codespace will open once ready.

There was a problem preparing your codespace, please try again.

Latest commit

0301465 Nov 17, 2023

Git stats

Files

Failed to load latest commit information.

Latest commit message
Commit time
September 5, 2023 14:48
August 29, 2023 17:24
November 12, 2023 23:41
November 13, 2023 00:10
November 13, 2023 00:26
November 12, 2023 23:53
March 30, 2023 19:39
November 17, 2023 23:15
June 25, 2022 22:23
March 31, 2022 23:18
June 24, 2021 15:10
February 7, 2021 16:32
March 7, 2018 20:14
October 31, 2015 12:20
November 3, 2017 10:34
July 19, 2023 00:12
November 12, 2023 23:53
January 10, 2022 19:44
March 20, 2023 23:49
November 12, 2023 23:53
April 1, 2015 09:08

README.md

Arduino core for ESP8266 WiFi chip

  • Latest release documentation
  • Current «git version» documentation
  • Install git version (sources)

Arduino on ESP8266

This project brings support for the ESP8266 chip to the Arduino environment. It lets you write sketches, using familiar Arduino functions and libraries, and run them directly on ESP8266, with no external microcontroller required.

ESP8266 Arduino core comes with libraries to communicate over WiFi using TCP and UDP, set up HTTP, mDNS, SSDP, and DNS servers, do OTA updates, use a file system in flash memory, and work with SD cards, servos, SPI and I2C peripherals.

  • Installing options:
    • Using Boards Manager
    • Using git version
    • Using PlatformIO
    • Building with make

    Installing with Boards Manager

    Starting with 1.6.4, Arduino allows installation of third-party platform packages using Boards Manager. We have packages available for Windows, Mac OS, and Linux (32 and 64 bit).

    • Download and install Arduino IDE 1.x or 2.x
    • Start Arduino and open the Preferences window
    • Enter https://arduino.esp8266.com/stable/package_esp8266com_index.json into the File>Preferences>Additional Boards Manager URLs field of the Arduino IDE. You can add multiple URLs, separating them with commas.
    • Open Boards Manager from Tools > Board menu and install esp8266 platform (and don’t forget to select your ESP8266 board from Tools > Board menu after installation).

    Boards manager link: https://arduino.esp8266.com/stable/package_esp8266com_index.json

    Using git version

    Also known as latest git or master branch.

    • When using Arduino IDE, follow our instructions here.
    • When using PlatformIO, refer to platformio/espressif8266 platform documentation.

    PlatformIO is an open source ecosystem for IoT development with a cross-platform build system, a library manager, and full support for Espressif (ESP8266) development. It works on the following popular host operating systems: macOS, Windows, Linux 32/64, and Linux ARM (like Raspberry Pi, BeagleBone, CubieBoard).

    • What is PlatformIO?
    • PlatformIO IDE
    • PlatformIO Core (command line tool)
    • Advanced usage — custom settings, uploading to SPIFFS, Over-the-Air (OTA), staging version
    • Integration with Cloud and Standalone IDEs — Cloud9, Codeanywhere, Eclipse Che (Codenvy), Atom, CLion, Eclipse, Emacs, NetBeans, Qt Creator, Sublime Text, VIM, Visual Studio, and VSCode
    • Project Examples

    Building with make

    makeEspArduino is a generic makefile for any ESP8266 Arduino project. Using make instead of the Arduino IDE makes it easier to do automated and production builds.

    Issues and support

    ESP8266 Community Forum is a well-established community for questions and answers about Arduino for ESP8266. Stackoverflow is also an alternative. If you need help, have a «How do I. » type question, have a problem with a 3rd party library not hosted in this repo, or just want to discuss how to approach a problem, please ask there.

    If you find the forum useful, please consider supporting it with a donation.

    If you encounter an issue which you think is a bug in the ESP8266 Arduino Core or the associated libraries, or if you want to propose an enhancement, you are welcome to submit it here on Github: https://github.com/esp8266/Arduino/issues.

    Please provide as much context as possible, as well as the information requested in the issue template:

    • ESP8266 Arduino core version which you are using (you can check it in Boards Manager)
    • your sketch code; please wrap it into a code block, see Github markdown manual
    • when encountering an issue that happens at run time, attach the serial output. Wrap it into a code block, just like the code.
    • for issues that happen at compile time, enable verbose compiler output in the IDE preferences, and attach that output (also inside a code block)
    • ESP8266 development board model
    • IDE settings (board choice, flash size)
    • etc

    For minor fixes of code and documentation, please go ahead and submit a pull request. A gentle introduction to the process can be found here.

    Check out the list of issues that are easy to fix — easy issues pending. Working on them is a great way to move the project forward.

    Larger changes (rewriting parts of existing code from scratch, adding new functions to the core, adding new libraries) should generally be discussed by opening an issue first. PRs with such changes require testing and approval.

    Feature branches with lots of small commits (especially titled «oops», «fix typo», «forgot to add file», etc.) should be squashed before opening a pull request. At the same time, please refrain from putting multiple unrelated changes into a single pull request.

    License and credits

    Arduino IDE is developed and maintained by the Arduino team. The IDE is licensed under GPL.

    ESP8266 core includes an xtensa gcc toolchain, which is also under GPL.

    Esptool.py was initially created by Fredrik Ahlberg (@themadinventor, @kongo), and is currently maintained by Angus Gratton (@projectgus) under GPL 2.0 license.

    Espressif’s NONOS SDK included in this build is under Espressif MIT License.

    ESP8266 core files are licensed under LGPL.

    SPI Flash File System (SPIFFS) written by Peter Andersson is used in this project. It is distributed under the MIT license.

    umm_malloc memory management library written by Ralph Hempel is used in this project. It is distributed under the MIT license.

    SoftwareSerial library and examples written by Peter Lerup. Distributed under LGPL 2.1.

    BearSSL library written by Thomas Pornin, built from https://github.com/earlephilhower/bearssl-esp8266, is used in this project. It is distributed under the MIT License.

    LittleFS library written by ARM Limited and released under the BSD 3-clause license.

    uzlib library written and (c) 2014-2018 Paul Sokolovsky, licensed under the ZLib license (https://www.zlib.net/zlib_license.html). uzlib is based on: tinf library by Joergen Ibsen (Deflate decompression); Deflate Static Huffman tree routines by Simon Tatham; LZ77 compressor by Paul Sokolovsky; with library integrated and maintained by Paul Sokolovsky.

    Other useful links

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *