在这个ESP8266项目的存储库中,我们将带您完成一些最推荐的DIY项目。它是一个非常小但有效的WiFi模块,它是各种基于IoT的任务和家庭自动化项目的一站式目的地。这些项目与Arduino项目非常相似,但是,使用内置WiFi创建了ESP8266项目。
Do you know that for a long-time world was unaware of ESP8266’s existence? It was some five years back, developers hit the jackpot named ESP-01 that allowed microcontrollers to get connected with a Wi-Fi network and simplify TCP/IP connection through Hayes-style commands. It has come a long way since then. The projects covered below will give a better insight into how it can perfect the IoT projects around you.
1) ESP8266 Weather Forecaster
如何拥有一个设备旁边doork吗nob that reminds you of carrying an extra water bottle if temperatures are expected to be higher than normal in your area. We are talking about a simple device that lets you know the weather with a simple change in LED color.
Things you will need
-
- 跳线
- Breadboard
- 4 X电阻
- 4倍LED
- ESP8266 12-E
What else will you need?
You will need an Open Weather Map API. The API key can be gained by signing up on the platform. Just get the key, copy it and paste it somewhere. To get information on weather in a selected location, you will have to enter the URL below while entering the location in curly brackets.
http://api.openweathermap.org/data/2.5/forecast?q={your city},{your country code}&appid ={您的API键}&mode = json&units = metric&cnt = 2
Copy this URL into the browser and it will provide you with all information needed on the local weather forecast.
Arduinojson库的安装
要安装Arduinojson库,您需要从https://github.com/bblanchon/ArduinoJson/archive/master.zip. Unzip the downloaded folder and you will have the ArduinoJson-master folder. Move it to Arduino IDE installation libraries folder and reopen the Arduino IDE>
Uploading code
在Arduino IDE拥有ESP8266附加组件后,只需转到工具段,然后单击“ Nodemcu(ESP-12E模块)”。在Arduino IDE上复制代码,并将其上传到ESP8266板上。您需要添加其他一些详细信息,例如国家代码,城市名称,密码SSID和Open Weather Map API在代码中。您可以查看所有编码详细信息:https://randomnerdtutorials.com.
原理图
下面的给定电路将使您对电路接线有一个清晰的想法。
The final picture should come up something like this
2)Blubug
您可能已经听说过创建传感器盾牌,蓝牙屏蔽或Wi-Fi盾牌。Blubug将所有这些盾牌融合在一起。它是一种合并格式,带有传感器,电动机,蓝牙,Wi-Fi以及单板中的无线编程盾牌。它允许您控制传感器数据并在线查看遥远位置的电动机。它消除了将Arduino插入PC的需求,从蓝牙通过Arduino IDE上传代码。更重要的是,由于Blubug装有一个通过虚拟操纵杆监视机器人的Android应用程序,因此变得更加容易。
Why do you need it?
The list of drawbacks associated with the purchase of different shields for every purpose is unending. An all-in-one solution sounds simple and solves all problems. With BluBug you can wirelessly upload codes from an Arduino IDE over Wi-Fi or Bluetooth (whatever you prefer). It is quite useful when your system has been deployed to some distant location and you aren’t able to afford wires spread all around for monitoring data, debugging, serial monitor, as well as uploading sketches. It also has a provision for connecting servo motors, stepper, DC, AC devices, analog sensors, and so on. There cannot be a better choice for your robotics and IoT projects.
Supplies and components needed
- 1 x Espressif ESP8266 ESP-01
- SparkFun, Step-Up Voltage Regulator – 3.3V x1
- 1x Genuino UNO and Arduino UNO
- 1 X Texas Instruments双H桥电动机驱动L293D
- 1x HC-05 Bluetooth Module
- Soldering Iron
您还能使用Blubug做什么?
Blubug非常适合所有机器人和物联网项目。它可以在构建自己的基于IoT的家庭自动化系统中发挥关键作用,以通过智能手机在您的公寓中打开风扇和灯光。它还可以帮助监测用于农业目的的温度,湿度,水分和其他诸如诸如温度,湿度,水分和其他的特征。
您可以在https://create.arduino.cc/projecthub/twob/twob/blubug-83ddbe?ref=tag&ref=tag&ref_id = easp8266&offset = 11中找到此设备的所有汇编详细信息
3)用ESP8266攻击PIR运动传感器
The project revolves around the modification of a commercial motion sensor through ESP8266 to register data whenever any movement is detected. The data is then sent to Node-RED with MQTT communication protocol. Here the ESP8266 absorbs power via motion sensor phase-out wire with the help of HLK-PM03 AC/DC converter.
Requirements
- 220V PIR Motion Sensor
- ESP8266-01
- ESP8266-01Serial Adapter
- 小型货币
- 万博app怎么更新
- 47 uF electrolytic capacitor
- 保险丝慢打击(200mA)
- Hi-Link HLK-PM03
概述
It is divided into three different parts:
- 电路大楼
- 创建和上传ESP8266代码
- 创建模式红色流量
让我们逐步讨论该过程
- 电路大楼:
首先,您需要摆脱PIR运动传感器的盖子。您将看到三根电线:逐步淘汰,循环,中性线。还建议您在HKL-PM03转换器以及输出的电容器之前向其添加慢速熔融保险丝。最后的大会看起来像这样: - ESP8255 code writing and uploading
For this project, ESp8266 will be programmed with Arduino IDE. You will need to start by installing the ESP8266 add-on. Also, install the PubSubClient library that will help in the creation of MQTT client for basic publishing of messaging with the server. Now, copy the code to Arduino IDE and start making modifications to it. You will need to add your own MQTT broker IP Address, password, and SSID. You can check out the complete coding details athttps://randomnerdtutorials.com.
接下来,您需要包括您的网络凭据,最后是MQTT Broker IP。
所以,如何维oes the code work? It is a simple thing that just publishes a message. Here the LED will light up every single time ESP8266 gets powered up. Once the code has been rectified with needed network credentials, it can be uploaded over the board. You will need an FTDI programmer or a serial adapter for this purpose.
- 节点红流创建:
Just before you create the flow, You need to install Mosquito Broker, Node-RED Dashboard and Node-RED in Raspberry Pi.
You will next need to import the Node-RED flow from the GitHub repository. This is how the imported flow looks like when it gets the ESP8266 MQQTT logs and messages whenever some movement is felt or identified. You can see the two buttons added for refreshing and clearing the log in the image below.
Node-RED Dashboard
Once the needful changes have been made, just tap on Deploy tab to save the changes. To access your application in the local network you will need to type http://Your_RPi_IP_address:1880/ui
该项目有助于黑客入侵运动传感器,并将其变成更聪明的动作传感器。HLK-PM03可用于从主电压直接向ESP8266供电。每当感知运动时,ESP8266就会加强并完成任务。然后,它订阅了MQTT消息,以记录感测的确切时间。同样,可以编写另一个代码以执行任何其他要求。
Final Words
These projects provide a clear glimpse into the potential held by ESP8266. The projects covered here were carefully chosen to showcase the range of tasks covered by this device. There are several other useful purposes served by ESP8266 like building home automation projects, creating a multisensor shield, web servers, DIY Amazon dash button clone, creating your own voltage regulator, door status monitor, and so on. We will talk more about that probably in our next blog.
References
- https://randomnerdtutorials.com/projects-esp8266/
- https://create.arduino.cc/projecthub/projects/tags/esp8266
- https://create.arduino.cc/projecthub/twob/blubug-83ddbe?ref=tag&ref_id = easp8266&offset = 11
- https://circuitdigest.com/esp8266-projects
You may also like:
提交以下:科技文章
与本文有关的问题?
Ask and discuss onedaboard.comandElectro-Tech-Online.comforums.
Tell Us What You Think!!
You must be登录to post a comment.