Skip to main content

Posts

Showing posts from May, 2024

Use of demux with Arduino to take multiple sensor data to single analog pin in arduino

  Use of demux with Arduino to take multiple sensor data to single analog pin in arduino Use of demux with Arduino to take multiple sensor data to single analog pin in arduino Components Required: Arduino Uno, 4052 demux and few sensors. Circuit diagram: In the following you can  put the any  output analog sensor instead of potentiometer output in 4052 IC. 74155 IC demux is used here. Arduino code float data; void setup()  {   Serial.begin(9600);  pinMode(8,OUTPUT);  pinMode(9,OUTPUT);  pinMode(A0,INPUT); } void loop() {   digitalWrite(8,LOW);   digitalWrite(9,LOW);   data= analogRead(A0);   Serial.print("Sensor1 value= "); //send sensor 1 value .  Serial.println(data);   delay(2000);          digitalWrite(8,LOW);   digitalWrite(9,HIGH);   data= analogRead(A0);   Serial.print("Sensor2 value= ");  //send sensor 2 value .  Serial.println(data);   delay(2000);     digitalWrite(8,HIGH);   digitalWrite(9,LOW);   data= analogRead(A0);   Serial.print("Sensor3 value= &

NodeMCU as Server

NodeMCU as Server Create A Simple ESP8266 NodeMCU Web Server A web server is a place where web pages are stored, processed, and served to web clients. A web client is just a web browser that we use on our computers and phones. A web client and a web server communicate using a special protocol known as Hypertext Transfer Protocol (HTTP). ESP8266 Operating Modes One of the most useful features of the ESP8266 is its ability to not only connect to an existing WiFi network and act as a Web Server, but also to create its own network, allowing other devices to connect directly to it and access web pages. This is possible because the ESP8266 can operate in three modes: Station (STA) mode, Soft Access Point (AP) mode, and both simultaneously. Station (STA) Mode In Station (STA) mode, the ESP8266 connects to an existing WiFi network (the one created by your wireless router). In STA mode, the ESP8266 obtains an IP address from the wireless router to which it is connected. With this IP address, it

Duplex serial communication between Arduino and Raspberrypi

  Duplex serial communication between Arduino and Raspberrypi Raspberrypi Setup  Detect the Arduino board When connecting the Arduino with a USB cable, you should see it appear as /dev/ttyACM0 or /dev/ttyUSB0 (sometimes the number can be different, for example /dev/ttyACM1). Simply open terminal and run the following command.  Run ls /dev/tty* and you should see it. At this point if you’re not sure which device is the Arduino board, simply disconnect the board (remove the USB cable), and run the above command again. This way you will easily spot the serial device name of your Arduino. For example in following pictures will observe the difference while running command before and after inserting arduino USB cable. Before inserting USB After inserting USB Here the difference is there is added a port red marked. Install Python Serial library on Raspberry Pi You need to install a library to be able to use the Serial interface with Python. To install it: Run python3 -m pip install pyserial T

How to setup Blynk IOT in Arduino IDE

How to setup Blynk IOT in Arduino IDE What is the Blynk app? The Blynk app is simply an open-source platform designed for iOS / Android devices to remotely control and view hardware. It is also designed for the Internet of Things (IoT). The dashboard can be customized in a very useful way by using various Widgets such as Buttons, Displays, Sliders included in this Blynk app. Also, this widget allows you to turn devices on / off and view sensor values. Lastly, you can view, store and visualize data through this. Install Blynk Library in Arduino IDE There are two ways to install Blynk Library for Arduino IDE: Using built-in library manager in Arduino IDE Installing Blynk library as ZIP file in Arduino IDE 1.Install Blynk Library using built-in library manager in Arduino IDE To install a new library into your Arduino IDE you can use the Library Manager (available from IDE version 1.6.2). Open the IDE and click to the "Sketch" menu and then Include Library > Manage Libraries.