We're done with basics of the NodeMCU in my. Now it's time to use the NodeMCU like how it's meant to be use: as an IoT device. Here I will show you how to create a simple NodeMCU web server which will control a LED attached to one of the NodeMCU's pins. Sounds interesting? Read on! For this to work, you must have already installed the ESP8266 board development toolkit as shown in my l Here's the code for our simple nodemcu web server: #include <ESP8266WiFi.h> // Replace with your network credentials const char* ssid = "**********"; const char* password = "**************"; // Set web server port number to 80 WiFiServer server(80); // Variable to store the HTTP request String header; String output5State = "off"; String output4State = "off"; const int output5 = 5; const int output4 = 4; void setup() { Serial.begin(115200); pinMode(output5, OUTPUT); pinMode(output4, OUTPUT); // Set outputs to ...
Posts
Showing posts from May, 2018
How to make a radar using Arduino and Processing IDE
- Get link
- X
- Other Apps
How to make a radar using Arduino and Processing IDE In this Arduino Tutorial I will show you how you can make this cool looking radar using the Arduino Board and the Processing Development Environment. You can watch the following video or read the written tutorial below for more details. I connected the Ultrasonic Sensor HC-SR04 to the pins number 10 and 11 and the servo motor to the pin number 12 on the Arduino Board. Now we need to make a code and upload it to the Arduino Board that will enable the interaction between the Arduino and the Processing IDE. For understanding how the connection works click here to visit my https://youtu.be/By86ma1mpxs Arduino Code:) #include <Servo.h>. // Defines Tirg and Echo pins of the Ultrasonic Sensor const int trigPin = 10; const int echoPin = 11; // Variables for the duration and the distance long duration; int distance; Servo myServo; // Creates a servo object for controlling the servo motor void setup() { pinMode(tr...