Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
95 views
42 pages
Minor 4th Sem Iot Gtu
IoT minor degree gtu
Uploaded by
Rupam Biswas
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download
Save
Save minor 4th sem Iot Gtu For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
95 views
42 pages
Minor 4th Sem Iot Gtu
IoT minor degree gtu
Uploaded by
Rupam Biswas
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Carousel Previous
Carousel Next
Download
Save
Save minor 4th sem Iot Gtu For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 42
Search
Fullscreen
LABORATORY MANUAL B.E. Semester — IV (2021 - 2022) COMPUTER ENGINEERING DEPARTMENT GUJARAT POWER ENGINEERING AND RESEARCH INSTITUTE MEVAD, MEHSANA, GUJARAT GUJARAT TECHNOLOGICAL UNIVERSITY CHANDKHEDA, AHMEDABAD, GUJARATGUJARAT POWER ENGINEERING AND RESEARCH INSTITUTE, MEHSANA (A constituent of Gujarat Technological University) This is certify that the work carried out by Mr. RUPAM BISWAS Enrollment No. 201040107059 student of Computer Engineering, semester IV of session 2022- 2023 has satisfactorily completed at Gujarat Power Engineering and Research Institute, Mehsana. This manual is record of his/her own work of subject INTRODUCTION TO IOT carried out under competent supervision and guidance. Date of Submission: Faculty In-charge Head Of DepartmentInstitute Computer Engineering Department Gujarat Power Engineering & Research INDEX SR.No. NAME OF EXPERIMENT. DATE Study of Arduino Uno Technical Specifications and different Sensors Study of Arduino MKR family, Node MCU, Raspberry Pi, and other IoT boards. Write [OT based application using Arduino board to tum on and off the LED and RGB LED. Write an 1OT based application using an Arduino board using a breadboard to turn on and off the LED and RGB LED. Write a 1OT application using Arduino to interface potentiometer, change the resistance to generate the different delay level to turn off and on LED. Write a program to sweep the shaft of an RC servo motor back and forth across 180 degrees. ToT application of multiple tone player Plays multiple tones on multiple pins in sequence TOT application using an ultrasonic rangefinder and returns the distance to the closest object in range, ‘Write a program to interface Neo pixel strip with Arduino board to display different RGB colors. 10 Write a program to demonstrate the use of a 16X2 LCD. Interface it with an Arduino which prints” Hello GPERI” to LCD and shows the time. Date: Sign. Of Faculty Sign. Of HODPractical-1 Aim: Study of Arduino Uno Technical Specifications and different Sensors Overview: Arduino Uno is a microcontroller board based on an 8-bit ATmega328P microcontroller. Along with ATmega328P, it consists of other components such as crystal oscillator, serial communication, voltage regulator, etc. to support the microcontroller. Arduino Uno has 14 digital input/output pins (out of which 6 can be used as PWM outputs), 6 analog input pins, a USB connection, A Power barrel jack, an ICSP header and a reset button, Arduino can be used to communicate with a computer, another Arduino board or other microcontrollers. The ATmega328P microcontroller provides UART TTL (SV) serial communication which can be done using digital pin 0 (Rx) and digital pin 1 (Tx). 4 Lara re a i Hl H toonPin Category Power Reset Analog InpuvOutput Pins Serial Extemal Interrupts PWM SPI Pin Name Vin, 3.3V, SV, GND Reset AO-AS Digital Pins 0 - 13 O(Rx), HT) 2,3 3,5, 6,9, LI 10 (SS), 11 (MOSs}, 12 (MISO) and 13 (SCK) Details ‘Vin: Input voltage to Arduino when using an external power source. 5V: Regulated power supply used to power microcontroller and other components on the board. 3.3V: 3.3V supply generated by on-board voltage regulator. Maximum current draw is S0mA. GND: ground pins Resets the microcontroller. Used to provide analog input in the range of 0-5V Can be used as input or output pins. Used to receive and transmit TTL serial data, To trigger an interrupt. Provides 8-bit PWM output, (Analog Write () function) Used for SPI communication. MISO (Master in Slave Out) - The Slave line for sending data to the master, MOSI (Master Out Slave In) - The Master line for sending data to the peripherals, SCK (Serial Clock) - The clock pulses which synchronize data transmission generated by the master and one line specific for every device: SS (Slave Select) - the pin on each device that the master can use to enable and disable specific devices When a device's Slave Select pin is low, it communicates with the master. When its high, it ignores the master. This allows you to have multiple SPI devices sharing the same MISO, MOSI, and CLK lines.191040107003, Inbuilt LED 13 TWI A4 (SDA), AS (SCL) AREF AREF AVR To turn on the inbuilt LED. Used for TWI communication. I2C (Inter-Integrated circuit) uses only two. bidirectional open collector or open drain lines, Serial Data Line (SDA) and Serial Clock Line (SCL), pulled up with resistors. Typical voltages used are +5 V or +3.3 V, although systems with other voltages are permitted. To provide reference voltage for input voltage. AVR is the architecture (developed by Atmel) of the microcontroller chipused in all official bit board. ARDUINO UNO R3 SMD Microcontroller Operating Voltage Recommended Input Voltage ATmega328P — 8-bit AVR family microcontroller sv 7-12191040107003, Input Voltage Limits 6-20 Analog Input Pins 6 (AO- AS) Digital I/O Pins 14 (Out of which 6 provide PWM output) DC Current on I/O Pins 40 mA DC Current on 3.3V Pin 50 mA Flash Memory, 32 KB (0.5 KB is used for Bootloader) SRAM 2KB EEPROM 1KB Frequency (Clock Speed) 16 MHz Arduino Board: Arduino Nano, Arduino Pro Mini, Arduino Mega, Arduino Due, Arduino Leonardo The 14 digital input/output pins can be used as input or output pins by using pin Mode (), digital Read () and digital WriteQ functions in Arduino programming. Each pin operates at 5V and can provide or receive a ‘maximum of 40mA current, and has an internal pull-up resistor of 20-50 K Ohms which are disconnected by default. Out of these 14 pins, some pins have specific functions as listed below: Serial Pins 0 (Rx) and 1 (Tx): Rx and Tx pins are used to receive and transmit TTL serial data. They are connected with the corresponding ATmega328P USB to TTL serial chip. External Interrupt Pins 2 and or falling edge, or a change in value ‘hese pins can be configured to trigger an interrupt on a low value, a rising PWM Pins 3, 5, 6, 9 and 11: These pins provide an 8-bit PWM output by using analog Write () function, SPI Pins 10 (SS), 11 (MOSID), 12 (MISO) and 13 (SCK): Phese pins are used for SPI communication. In-built LED Pin 13: This pin is connected with a built-in LED, when pin 13 is HIGH ~ LED is on and when pin 13 is LOW, it's off. Along with 14 Digital pins, there are 6 analog input pins, each of which provide 10 bits of resolution, i.e., 1024 different values. They measure from 0 to 5 volts but this limit can be increased by using AREF pin with analog 7191040107003, Reference () function. Analog pin 4 (SDA) and pin 5 (SCA) are also used for TWI communication using the Wire library. Arduino Uno has a couple of other pins as explained below: AREF: Used to provide reference voltage for analog inputs with analog Reference () function, Reset Pin: Making this pin LOW, resets the microcontroller. ICSP- In-circuit serial programming PWM- pulse width modulation SPI- serial peripheral interface TWI- Two wire interface, Relay: Arelay is a switch or like a lever which switches on with small current (ma). It switches on another appliance (Bulb, pump etc.) using bigger current (5 Amp, 240 V). Multi Color LED (RGB LED): Multi color LED is three LEDs in one. L.e., Red, Green and Blue. LEDS packed in one casing with a common point. Yf191040107003, IR receiver: (TSOP 173X): An infrared receiver is used in an IR system to control and operate devices by sending signals. Photo detector which detects IR signals and preamplifier in one package. It outputs a constant HIGH signal when idle and as it receives data. It inverts (outputs active low). It has high immunity against ambient light DC motor with DC motor driver board: DC motor requires a driver board so that it can be properly interfaced and controlled via Arduino uno. The driver board ensures appropriates current and voltage is provided so that it does not overload Arduino uno. The driver board has ability to driver two different motors. Different sensors: 1) Soil Moisture Sensor: Moisture sensor, water sensor used to detect soil moisture. When soil moisture a high level. When the soil moisture is substantial, the module outputs a low, in deficit, the module outputs191040107003, 2) Temperature sensor: ‘The LM3S series are precision integrated circuit temperature device with an output voltage linearly-proportional to the centigrade temperature. Lmss 44200 2our 5 36ND re 3) Ultrasonic sensor: (HC-SRO4): it uses a sonar to determine distance to an object. This is similar the way in which bats detects object. Sensor offers non-contact range detection with high accuracy and stable readings in an easy-to-use package. Its operation is not affected by sunlight or black material. 4) Accelerometer & eryoscopy (MPU 6050): It is single chip accelerometer and gyroscope. It measures acceleration. It responds to vibrations associated with the movement when an object goes from standstill to any velocity. It measures acceleration on one, two or three axes, Gyroscope uses earth’s gravity to determine orientation. It based on principle of angular momentum and measures the rate of rotation around a particular axis. Accelerometer and gyroscope senses motion 10191040107003, leftright, up/down, forward/backward, It also detects angular moments from three axes X.Y.Z referred as Yaw, Roll, and Pitch. PIR- Sensor is used in pedestrian signal operation with human presence detection. A passive infrared sensor is n its field of view. They are most often an electronic sensor that measures infrared light radiating from objec used in PIR-based motion detectors. PIR sensors are commonly used in security alarms and automatic lighting applications PIR Cube distance 6 meter PIR Detastion / ir / Horizont range 108.6 degree PH sensor- water quality is monitored through sensors that measure pH, chloride level. A pH sensor is one of the most essential tools that's typically used for water measurements. This type of sensor is able to measure the amount of alkalinity and acidity in water and other solutions Photodiode is one type of light detector, used to convert the light into current or voltage based on the mode of operation of the device. Photodetectors, also called photosensors, are sensors of light or other electromagnetic radiation[) u191040107003, + A photo detector has a p-n junction that converts light photons into current, The absorbed photons make electron-hole pairs in the depletion region. Photodiodes and photo transistors are a few examples of photo detectors. Solar cells convert some of the light energy absorbed into electrical energy . A photodetector salvaged from a CD-ROM drive. The photodetector contains three photodiodes, Photoresistor (also known as a light-dependent resistor, LDR, or photo- conductive cell) is a passive component that decreases resistance with respect to receiving luminosity (light) on the component's sensitive surface. Proximity sensor is a sensor able to detect the presence of nearby objects without any physical contact. Proximity Sensors convert information on the movement or presence of an object into an electrical signal. + No contacts are used for output, so the Sensor has a longer service life + Unlike optical det is used. tion methods, Proximity Sensors are suitable for use in locations where water or oil + Proximity Sensors provide high-speed response, compared with switches that require physical contact. Proximity Sensors are not affected by colors. 12191040107003, A gas detector is a device that detects the presence of gases in an area, often as part of a safety system. This type of equipment is used to detect a gas leak or other emissions and can interface with a control system so a process can be automatically shut down. + Based on the concentration of the gas the sensor produces a corresponding potential difference by changing the resistance of the material inside the sensor, which can be measured as output voltage. Based on this voltage value the type and concentration of the gas can be estimated A rain sensor is one kind of switching device which is used to detect rainfall. It works like a switch and the working principle of this sensor is, whenever there is rain, the switch will be normally closed. A rain sensor or rain switch is a switching device activated by rainfall. There are two main applications for rain sensors. The first is a water conservation device connected to an automatic irrigation system that causes the system to shut down in the event of rainfall.191040107003, Practical-2 Ain tudy of Arduino MKR family, NodeMCU, Raspberry Pi, and other IoT boards. Arduino MKR mily Board Arduino is always keeping pace with current development and MKR family is an example of such effort from Arduino. Arduino MKR GSM (Global system for Mobile Communication) 1400 is a cellular-enabled IoT development board that supports 2G and 3G Arduino MKR 1000 and MKR 1010 are wifi-enabled IoT development boards. Arduino MKR NB 1500 is NB-IoT (Narrow-band) enabled board and MKR WAN 1300 is LoRa enabled board. We can pick any board depending upon choice and support of connectivity options. The base MKR board is the same that has all the needed features for quick and easy IoT prototype development. All the boards are based on the 32-bit Atmel ATSAMW25 SoC (System on Chip), which is part of the SmartConnect family of Atmel Wireless devices, specifically designed for IoT projects and devices The board also has a LiPo charging circuit and is equipped with ECCS08 Crypto Authentication chip for a secure connection, Arduino Nano 33 loT Board Itis a direct upgrade of the Arduino Nano series of the board to support loT development out of the box. The board’s main processor is a low power Arm® Cortex®-MO0 32-bit SAMD21 ‘The board has Wi-Fi and Bluetooth® connectivity that is performed with a module from unbox, the NINA- W10, a low power chipset operating in the 2.4GHz range. On top of that, secure communication is ensured through the Microchip® ECC608 crypto chip. Besides that, you can find a 6 axis IMU (Inertial measurement unit), which makes this board perfect for simple vibration alarm systems, pedometers, the relativepositioning of robots, ete, NodeMcu NodeMCU is an open-source Lua based firmware and development board specially targeted for IoT based applications. It includes firmware that runs on the ESP8266 Wi-Fi SoC from Espresso if Systems, and hardware that is based on the ESP-12 module. 4191040107003, NodeMCU Development Board Pinout Configuration Pin Category Name Description Power Miicro-USB,3.3V,GND,/Miero-USB: NodeMCU can be powered through the USB port Vin .3V: Regulated 3.3V can be supplied to this pin to power the board GND: Ground pins Extemal Power Supply 15191040107003, Control Pins EN,RST The pin and the button reset the microcontroller Analog Pin AO ‘Used to measure analog voltage in the range of 0-3.3V GPIO Pins GPIO1 NodeMCU has 16 general purpose input-output pins on its board to GPIOI6 SPI Pins SD1, NodeMCU has four pins available for SPI communication. CMD, SDO, CLK UART TXDO, NodeMCU has two UART interfaces, UARTO (RXDO & TXDO) and Pins RXDO UARTI (RXD1 & TXD]). : UART is used to upload the firmware/program. Txp2, RXD2 12C Pins NodeMCU has 12C functionality support but due to the internal functionality of these pins, you have to find which pin is 12C. Raspberry Pi Raspberry Pi (/pav/) is a of small single-board computers developed in the United Kingdom by the Raspberry Pi Foundation in association with Broadcom '"*) Early on, the Raspberry Pi project leaned towards the promotion of teaching basic computer scien in schools and in developing countries. The Raspberry Pi is one of the best-selling British computers.°") The Raspberry Pi is a remarkable device: a fully functional computer in a tiny and low-cost package, ‘The Raspberry Pi is known as a single-board computer, which means exactly what it sounds like: it’s a computer, just like a desktop, laptop, or smartphone, but built on a single printed circuit board, Like most single-board computers, the Raspberry Pi is small — roughly the same footprint as a credit card — but that doesn’t mean it’s not powerful: a Raspberry Pi can do anything a bigger and more power-hungry computer can do, though not necessarily as quickly. 16191040107003, All Raspberry Pi models have one thing in common, though: they’re compatible, meaning that software written for one model will run on any other model. Raspberry Pi 3 Model B+, the latest and most popular version of the Raspberry Pi. Raspberry Pi Zero W The Raspberry Pi Zero W is a powerful mini-computer that comes with wireless LAN and Bluetooth connectivity. The Raspberry Pi Zero W extends the Pi Zero family. Launched at the end of February 2017, the Pi Zero W has all the functionality of the original Pi Zero but comes with added connectivity for developing loT applications. We can build a more powerful loT application like a gateway and at the same time want to keep the cost and power consumption low. this might be the perfect board for you. 7191040107003, ESP32PicoKit ESP32-Pico-Kit is an ESP32-based mini development board produced by well known Espressif. The core of this board is ESP32-PICO-D4 — a System-in-Package (SiP) module with complete Wi-Fi and Bluetooth functionalities. Compared to other ESP32 modules, ESP32-PICO-D4 integrates many peripheral components in one single package like 40 MHz crystal oscillator, 4 MB flash, Filter capacitors, RF matching links, etc. which makes it very useful for building IoT product out of the box. ESP32-PICO-D4 LDO USB-to-UART Bridge 3D Antenna —= 5 Micro USB Port Power On LED VO Connector c.io is a well-known new age loT company that is prov started and build a great loT product. ling a full-stack oT solution for anyone to get Particle.io provides hardware development boards, connectivity options from cellular to mesh, and power cloud to manage a fleet of devices, store data, and perform analytics. Particle’s Argon is a powerful Wi-Fi enabled development board that can act as a standalone Wi-Fi endpoint. It is based on the Nordic nRF52840 and has built-in battery charging circuitry so it’s easy to connect a Li-Po. ‘All Particle Hardware is designed from the ground up to work with the Device Cloud; a powerful set of tools and infrastructure to build, connect and manage your IoT fleet. All Particle customers get 10 free micro networks using a Wi-Fi or Ethernet gateway. A micro network is defined as a network with 10 total devices and a single gateway. 18191040107003, Pycom WiP, Pycom WiPy 3.0 is an enterprise-grade micro-python enabled IoT development board by Pycom. It has a Wi-Fi range of 1km and also supports Bluetooth capabilities. It works using a state-of-the-art Espressif ESP32 chipset and dual processor. Pycom is on a mission to remove barriers and speed up all aspects of IoT development. Pycom also provides end-to-end IoT platform support from hardware to connectivity to cloud, se tools. Everything under one umbrella, ity, and dev Aisa Prwipy’ Name re enol @ 3 MERRIE 19191040107003 Practical — 3 Aim: - Write OT based application using Ard off theLED and RGB LED. Theory: * An RGB LED has 4 pins red,blue,green and cathode. Connect the cathode of the RGB LED to the GND of Arduino and the other three pins to the pin 3, 5, 11 of Arduino with 3002 resistors. «Ifyou are using the common anode RGB led, then connect the long lead to the SV of Arduino. * Set the pinMode of the pins to OUTPUT as we want to turn on the RGB LED with some high amount of voltage.Current flows in a gap of every 1000 milliseconds. Workin; + While giving power to the Arduino board the current flows through pins 3, 5 and 11 in a loop. At this time the given voltages turn on the light in respective colors 3 for Red, 5 for Green, 11 for Blue. Current flows in gap of every 1000 milliseconds Connection of RGB LED 20191040107003, UN RGB LED with RED color RGB LED with Green color UNO) 2201040107059 RGB LED with BLUE color e CODE: If C++ code int redPin=3;, int bluePin=5; int greenPin=, void setup() { Serialbegin(3600); ppinMode(LED_BUILTINOUTPU Ts pinMedredPin OUTPUT); pinMode(bluePin,OUTPUT); pinMode(greenPin,OUTPUT); ) void oop) {delay(s00)201040107059 digitalWrite(redPin,red); delay(500); digitalWrite{greenPin,red) ‘delay(500); digitalWrite(bIuePin,red); delay(500); 2B201040107059 e CIRCUIT DIAGRAM: UNO Circuit Diagram In this guide we have demonstrated that it is indeed possible for the Arduino to juggle multiple independent tasks while remaining responsive to external events like user input. + We've leamed how to time things using millis () instead of delay () so we can free up the processor to do other things. + We've leamed how to define tasks as state machines that can execute independently of other state machines at the same time. 24201040107059 Practical — 4 Aim: - Write OT based application using Arduino board using a breadboard toturn on and off the LED and RGB LED. ‘Theory: + An RGB LED has 4 pins red,blue,green and cathode, Connect the cathode of the RGB LED to the GND of Arduino and the other three pins to the pin 3, 5, 11 of Arduino with 300 resistors. + Ona breadboard place the resistors in the following way given below in the figure and connect it with LED + Set the pinMode of the pins to OUTPUT as we want to turn on the RGB LED with some high amount of voltage,Current flows in a gap of every 1000 milliseconds. + While giving power to the Arduino board the current flows through pins 3, 5 and 11 in a loop and further to the breadboard. At this time the given voltages tum on the light in respective colors 3 for Red, 5 for Green, 11 for Blue. Current flows in a gap of every 1000 milliseconds. oan 25201040107059201040107059 e CIRCUIT DIAGRAM: & te — Circuit Diagram In this guide we have demonstrated that it is indeed possible for the Arduino to work properly fine using a breadboard and with the help of jumper wires. 27201040107059 e CODI U1 C+ code ¢ redPin=3} int bluePin=6; int greonPin=ti void sotup(){ Serial begin(9600); bytes pinMode(LED_BUILTIN,OUTPUT); pinModelredPin, OUTPUT): pinMode(bIuePin, OUTPUT); pinMode(greenPin, OUTPUT); void loop() {delay(s00) digitalWrite(redPin,red); delay(500); dligitaWrtelgreenPin,red) jdelay(500); digitalWrite(bluePin,red); delay(500); } CONCLUSION: In this practical we learnt how to operate a RGB LED using breadboard and arduino and how we canshow different colors in the led. initialize with 9600 J fst redpin as output //set bluepin as output /set greenpin as output201040107059 Practical — 5 Aim: - Write OT based application using Arduino board to interface potentiometer, change the resistance generates the different delay levels toturn ON and OFF LED. © Theory : 0 Connect the terminal 1 to +5V pin and terminal 2 to GND pin, connect the wiper to Analog pin Ao. 0 Connect the cathode pin of led to GND pin and the positive terminal of led to pin 13 © Working : While giving power to the Arduino board the current flows through pin 13 and towards the potentiometer that sets the delay level. 0 which means high resistance is inversely proportional to delay time. ° 29201040107059 CIRCUIT DIAGRAM: In this guide we have demonstrated that it is indeed possible for the Arduino to juggle multiple independent tasks while remaining responsive to external events like user input. 20, Vy + We've learned how to set the different delay levels using a potentiometer. * how to read digital and analog signals through arduino. 30201040107059 CODE: int sensorPin = AO; int ledPin = int sensorValue = 0; void setup) { declare the ledPin as an OUTPUT: pinMode(ledPin, OUTPUT); } void loop0 { sensorValu mnalogRead{sensorPin); digital Write(ledPin, HIGH); delay(sensorValue); digitalWrite(ledPin, LOW); delay(sensorValue); CONCLUSION: read the value from the sensor: tum the ledPin on stop the program for
milliseconds: tum the ledPin off stop the program for for
milliseconds; In this practical we learnt how to set different delay levels of led turning on and off using a potentiometer, as the resistance of the potentiometer will increase the delay will decrease. 31° 201040107059 Practical — 6 Aim: -Write a program to Sweeps the shaft of an RC servo motor back and forth across 180 degrees. Theory : Connect the Anode to +5V pin and cathode to GND pin, connect the signal pin to Digital pin 3. Working : While giving power to the Arduino board the current flows through the servo motor. the servo motor receives the signal from the arduino which tums the head of the servo 1808 32201040107059201040107059 CIRCUIT DIAGRAM : . ‘The PWR terminal of the servo motor is connected to the SV anode, the GND terminal of the servo motor is connected to the GND of arduino the SIG terminal of the servo motor is connected to Digital pin 3 of arduino. CODE : ‘include
Servo s; int pos = 0; void setup() t ssattach(3); } void loop0 { for (pos { sawrite(pos); delay(15); ) delay(1000); for (pos = 180; pos >= 0; pos = 1) { suwrite(pos); delay(15); ) delay(1000); } ; pos <= 180; pos += 1) CONCLUSION: Vereate a servo object set position to 08, bind the pin 3. Iirotate the head 180 degree. rotate the head back to 0 degree In this practical we learnt how to sweep the shaft of an rc servo motor 180 degrees back and forth usingarduino. 34201040107059 Practical — 7 Aim: -IoT application of multiple tone player Plays multiple tones on multiple pins in sequence. Theory : Take 3 Piezo, 3 1002 resistors and an arduino board. Connect the Anode terminals of the piezo to pin 5,6,9 followed by a resistor given in below figure and cathode to GND pin Working : A specific tone of a frequency is played on the piezo for a specific interval of time on the assigned pins.201040107059 CIRCUIT DIAGRAM CODE: int sI=5; int 2-6; int s3-9; void setup() { pinMode(s1,0UTPU 1); pinMode(s2,OUTPUT); pinMode(s3,OUTPUT); 3 void loop() { noTone(5); tone(s1,560,300); delay(500); noTone(6); tone(s2, 650, 300); delay(500); noTone(9); tone(s3, 800, 300); delay(500); CONCLUSION: In this practical we learnt how to play different frequencies of sound on a piezo speaker using arduino. 36201040107059 Practical — 8 Aim: - IOT application using an ultrasonic rangefinder and returns the distance to the closest object in range. Theory : Take an ultrasonic distance measuring sensor module 28015. Connect the Anode terminals of the sensor to +5V , cathode to GND pin and the SIG terminal to Digital pin 7. Working : ‘The sensor detects the distance between the objects closer to it in inches then the program converts the inches in centimeters and displays them in the serial console, there are 2 types of ultrasonic sensors: 3 pin and 4 pin sensors. 3 pin sensors have trigger and echo signals on the same pin whereas 4 pin sensors have separate pins for trigger and echo. 37201040107059 CIRCUIT DIAGRAM (ge CODE: long readDistance(int triggerPin, int echoPin) { pinMode(triggerPin, OUTPUT); // Set the trigger digitalWrite(triggerPin, LOW); delayMicroseconds(2); 1 Sets the trigger pin to HIGH state for 10 microseconds digital Write(triggerPin, HIGH); pinMode(echoPin, INPUT); !/ Reads the echo pin, and returns the sound wave travel time in microseconds return pulseln(echoPin, HIGH); } void setup() { pinMode(LED_BUILTIN, OUTPUT); Serial.begin(9600); } void loop) { Serial.printin(0.01723 * readDistance(7, 7)); } CONCLUSION: In this practical we learnt how to interface the ultrasonic distance measuring sensor 28015 in arduinoand how to measure the distance of an object. 38° oo 201040107059 Practical — 9 Aim: - Write a program to interface a Neopixel strip with an Arduino boardto display different colors of RGB colors. Theory : Connect the NeoPixel LED strip to the arduino board. The strip has 2 sides horizontally: first is In,+5V,GND and second is Out,+5V,GND where the second terminal can be connected to the firstterminal of another strip. Connect the Anode terminal of the strip to +5V , cathode to GND pin and the In terminal to Digital pin 7. Working : Each LED on the strip is an individual RGB LED which can display colors in RGB in range 0-255, ‘There are 4 strips of 20 LED's which show a cyclic rainbow animation from red to red. 39,201040107059 CIRCUIT DIAGRAM CODE: ‘include
‘define LED_COUNT 80 ‘decline LED_PIN7 ‘Adafruit_NeoPixel strip(LED_COUNT, LED_PIN, NEO_GRB + NEO_KHZ800); void setup) { strip begin0; stip show); strip.setBrightness(255); } void loop) {rainbow(!) } void rainbow(int wait) { for(long firstPixell1ue = 7*65536; firstPixelHlue >; firstPixelHue 1024) { for(int i=strip.numPixels(); i>=05 i-) { int pixelHue = firstPixclHue + (i * 65536L / strip numPixels()); strip sctPixelColor(,strip.gamma32(strip.ColorHSV (pixelliue))); } stip.show(); delay(wait) ) } CONCLUSION: Vinitialize the strip with SOOKE start the led's show the values on led's ‘set the brightness on led's In this practical we learnt how to interface the neopixel led strip to the arduino and how to show different colors on the strip with many animations. 40191040107003, Practical — 10 Aim: - Write a program to demonstrate the use of a 16X2 LCD. Interface it with an Arduino which prints” Hello GPERI” to LCD and shows the time. Theory : Connect the Vec, LED anode and the terminal 1 of potentiometer to +5V of arduino , connect GNDR/W and LED cathode and the second terminal of potentiometer to GND pin of arduino, connect the DB 4,5,6,7 to Digital pin 2,3,4,5,connect the E pin of display to Digital pin 11, connect the Register Select pin of display to Digital pin 12 , connect the contrast pin of display to the viper ofthe potentiometer to display the contrast on the screen. Working : When the resistance on the potentiometer is increased the contrast of the text inereases through which the text can be visible on the display. 39191040107003, CIRCUIT DIAGRAM at Lop = tex2 CODE: Hinclude
LiquidCrystal led(12, 11, 5, 4, 3, 2); // sets the interfacing pins void setup() { Icd.begin(16, 2); // initializes the 16x2 LCD } void loop() { Icd.setCursor(3,0); //sets the cursor at row 0 column 3lcd.print("Time 8:20"); // prints the time Icd.setCursor(5,1);_ //sets the cursor at row 1 column 5led.print("GPERI"); } CONCLUSION: In this practical we learnt how to interface a 16x2 display in arduino and display different text andanimations on the text. 40
You might also like
Iot Projects Easy With Arduino
PDF
No ratings yet
Iot Projects Easy With Arduino
26 pages
Jhoanie Marie P. Cauan Bsece 4 - 1 CPEN 105B Engr. Andy A. Dizon
PDF
No ratings yet
Jhoanie Marie P. Cauan Bsece 4 - 1 CPEN 105B Engr. Andy A. Dizon
5 pages
Internet of Things Lab (IOT) : Laboratory Practical File
PDF
100% (1)
Internet of Things Lab (IOT) : Laboratory Practical File
36 pages
Lab Based Project Report On: Obstacle Avoiding Robot
PDF
No ratings yet
Lab Based Project Report On: Obstacle Avoiding Robot
27 pages
Contact Less Tachometer: IC 741c:an IC 741c Is Single Op-Amp Device. An
PDF
No ratings yet
Contact Less Tachometer: IC 741c:an IC 741c Is Single Op-Amp Device. An
6 pages
Arduino Uno
PDF
No ratings yet
Arduino Uno
3 pages
Assignment: Programming With Arduino and Raspberry Pi
PDF
No ratings yet
Assignment: Programming With Arduino and Raspberry Pi
26 pages
FALLSEM2024-25_BCSE312L_TH_VL2024250101500_2024-08-08_Reference-Material-I
PDF
No ratings yet
FALLSEM2024-25_BCSE312L_TH_VL2024250101500_2024-08-08_Reference-Material-I
21 pages
Experiment 1: Introduction To Arduino UNO
PDF
No ratings yet
Experiment 1: Introduction To Arduino UNO
6 pages
Arduino Uno
PDF
No ratings yet
Arduino Uno
12 pages
Arduino UNO Microcontroller-Vvb
PDF
No ratings yet
Arduino UNO Microcontroller-Vvb
121 pages
IOT Record
PDF
No ratings yet
IOT Record
54 pages
IPL Team-1 Pro
PDF
No ratings yet
IPL Team-1 Pro
25 pages
Embedded Systems With Arduino
PDF
No ratings yet
Embedded Systems With Arduino
10 pages
Arduino - Board Description
PDF
No ratings yet
Arduino - Board Description
3 pages
Arduino Uno Wifi
PDF
No ratings yet
Arduino Uno Wifi
4 pages
PHYSICS
PDF
No ratings yet
PHYSICS
8 pages
Electrical Basic Session
PDF
No ratings yet
Electrical Basic Session
66 pages
Arduino 2
PDF
No ratings yet
Arduino 2
19 pages
Arduino: Introduction & Programming: Course Instructor
PDF
100% (1)
Arduino: Introduction & Programming: Course Instructor
29 pages
Arduino - Board Description
PDF
No ratings yet
Arduino - Board Description
4 pages
Arduino Uno: Pin Description
PDF
100% (1)
Arduino Uno: Pin Description
6 pages
IOT Exp-1
PDF
No ratings yet
IOT Exp-1
8 pages
Arduino Uno Pin Diagram, Specifications, Pin Configuration & Programming
PDF
100% (1)
Arduino Uno Pin Diagram, Specifications, Pin Configuration & Programming
5 pages
Arduino Pins and Components (1)
PDF
No ratings yet
Arduino Pins and Components (1)
4 pages
Minor Project Report Controlling Computer With Hand Gestures Using Arduino and Python
PDF
100% (5)
Minor Project Report Controlling Computer With Hand Gestures Using Arduino and Python
27 pages
Microcontrollers
PDF
No ratings yet
Microcontrollers
62 pages
Hands 0N With Robotics Components
PDF
No ratings yet
Hands 0N With Robotics Components
54 pages
E Book Ultimate+Home+Automation+Using+Advance+AI+Assistant+JARVIS
PDF
No ratings yet
E Book Ultimate+Home+Automation+Using+Advance+AI+Assistant+JARVIS
22 pages
Smart Building Using PIR Sensor
PDF
No ratings yet
Smart Building Using PIR Sensor
16 pages
Major Project PPT by Joshi
PDF
No ratings yet
Major Project PPT by Joshi
20 pages
Abstract - WPS Office
PDF
No ratings yet
Abstract - WPS Office
12 pages
Arduino Uno: Arduino Uno R3 Front Arduino Uno R3 Back
PDF
100% (1)
Arduino Uno: Arduino Uno R3 Front Arduino Uno R3 Back
16 pages
Prerit Iot File
PDF
No ratings yet
Prerit Iot File
28 pages
Iot Codes
PDF
No ratings yet
Iot Codes
50 pages
U3 Removed
PDF
No ratings yet
U3 Removed
32 pages
WSN (Jinesh Prajapat)
PDF
No ratings yet
WSN (Jinesh Prajapat)
62 pages
Iot Worksheet
PDF
No ratings yet
Iot Worksheet
50 pages
IOT Lab Manual Version 1.2
PDF
No ratings yet
IOT Lab Manual Version 1.2
51 pages
Arduino Tutorial 1
PDF
No ratings yet
Arduino Tutorial 1
16 pages
Internet of Things (Iot)
PDF
100% (1)
Internet of Things (Iot)
54 pages
Task3 Clar
PDF
No ratings yet
Task3 Clar
3 pages
AC Project Report
PDF
No ratings yet
AC Project Report
31 pages
DOC-20230410-WA0003.Arduino Uno
PDF
100% (1)
DOC-20230410-WA0003.Arduino Uno
26 pages
Chapter-07-Arduino-Programming
PDF
No ratings yet
Chapter-07-Arduino-Programming
63 pages
Arduino Based Voice Announcement System For Material
PDF
No ratings yet
Arduino Based Voice Announcement System For Material
45 pages
Arduino (Emman) PDF
PDF
No ratings yet
Arduino (Emman) PDF
9 pages
UNIT4 ARDUINO_NOTES_PPT
PDF
No ratings yet
UNIT4 ARDUINO_NOTES_PPT
82 pages
ARDUINO
PDF
No ratings yet
ARDUINO
14 pages
IR Sensor by Using LED For Arduino
PDF
No ratings yet
IR Sensor by Using LED For Arduino
10 pages
Arduino
PDF
100% (1)
Arduino
67 pages
Arduino Uno
PDF
No ratings yet
Arduino Uno
5 pages
Arduino Project
PDF
No ratings yet
Arduino Project
18 pages
Arduino Uno Pin Diagram, Specifications, Pin Configuration & Programming
PDF
No ratings yet
Arduino Uno Pin Diagram, Specifications, Pin Configuration & Programming
12 pages
Contactless Digital Tachometer Using Microcontroll-1 PDF
PDF
No ratings yet
Contactless Digital Tachometer Using Microcontroll-1 PDF
7 pages
Harhsita File
PDF
No ratings yet
Harhsita File
17 pages
Manual Arduino Uno
PDF
No ratings yet
Manual Arduino Uno
8 pages