SlideShare a Scribd company logo
Sanjivani Rural Education Society’s
Sanjivani College of Engineering, Kopargaon-423 603
(An Autonomous Ins tute, Affiliated to Savitribai Phule Pune University, Pune)
NACC ‘A’ Grade Accredited, ISO 9001:2015 Certified
Department of Computer Engineering
(NBA Accredited)
Programming for IOT
Subject- Internet of Things (CO312)
Unit No: -2 Programming for IOT
Programming for IOT
Contents:
Introduction to Arduino Programming: Features of Arduino, Board details, Setup and IDE.
Introduction to Python programming: Python IDE, Basic programs on Raspberry Pi, Setup
and Installation of OS, Pin Configuration,
Implementation of IoT Applications with Raspberry Pi.
Programming for IOT
Introduction to Arduino Programming: Features of Arduino, Board details, Setup and
IDE: -
Arduino is a software as well as hardware platform that helps in making electronic projects. It is an
opensource platform and has a variety of controllers and microprocessors. There are various types of
Arduino boards used for various purposes.
The Arduino is a single circuit board, which consists of different interfaces or parts. The board consists of
the set of digital and analog pins that are used to connect various devices and components, which we want to
use for the functioning of the electronic devices.
Programming for IOT
Features of Arduino:
1.Microcontroller-based: Arduino boards are equipped with microcontrollers from the Atmel AVR or
ARM families, providing computational capabilities for controlling electronic circuits and interfacing
with sensors, actuators, and other peripherals.
2.Open-source Hardware and Software: Arduino hardware designs are open-source, allowing users to
study, modify, and manufacture their own boards. Additionally, the Arduino software platform, including
the IDE and libraries, is open-source and freely available for download and modification.
3.Versatility: Arduino boards support a wide range of input and output options, including digital and
analog pins, serial communication interfaces (UART, SPI, I2C), PWM (Pulse Width Modulation) outputs,
and more, making them suitable for diverse projects and applications.
Programming for IOT
4.Expandability: Arduino boards can be expanded with shields, which are add-on modules that provide
additional functionality such as wireless connectivity (Wi-Fi, Bluetooth), motor control, GPS, display
interfaces, and sensor integration.
5.Community Support: Arduino boasts a large and active community of users, developers, and enthusiasts
who contribute to forums, tutorials, projects, and libraries, providing valuable resources for learning and
troubleshooting.
Arduino Board Details:
Programming for IOT
Arduino offers a variety of boards tailored to different requirements and applications.
1.Arduino Uno: features an ATmega328P microcontroller, digital and analog input/output pins, USB
connectivity for programming and power, and a 16 MHz crystal oscillator. The Uno is an excellent choice
for beginners due to its simplicity and versatility.
2.Arduino Mega: The Arduino Mega is similar to the Uno but offers more input/output pins, making it
suitable for larger and more complex projects. It features an ATmega2560 microcontroller and is commonly
used in projects requiring numerous connections and peripherals.
3.Arduino Nano: The Arduino Nano is a compact and breadboard-friendly version of the Uno, making it
ideal for projects with space constraints. Despite its small size, it retains most of the Uno's features and is
suitable for a wide range of applications.
Programming for IOT
4.Arduino Leonardo: The Arduino Leonardo differs from the Uno by using an ATmega32u4 microcontroller
with built-in USB functionality. This allows it to emulate a computer keyboard or mouse, making it suitable
for projects involving HID (Human Interface Device) emulation.
5.Arduino Due: The Arduino Due is based on a more powerful microcontroller, the Atmel SAM3X8E ARM
Cortex-M3 CPU. It offers significantly more processing power and memory compared to other Arduino
boards, making it suitable for demanding applications such as audio processing and advanced robotics.
6.Arduino Pro Mini: The Arduino Pro Mini is a stripped-down version of the Uno, designed for users who
require a smaller form factor and lower cost. It lacks onboard USB connectivity and requires an external
programmer for uploading sketches, making it suitable for embedded applications where space is limited.
Programming for IOT
Setup and IDE: -
1. Download the Arduino IDE:
• Visit the official Arduino website (https://www.arduino.cc/en/software) and navigate to the
"Software" section.
• Download the appropriate version of the Arduino IDE for your operating system (Windows, macOS,
or Linux).
2. Install the Arduino IDE:
• Once the download is complete, locate the downloaded file and run the installer.
• Follow the on-screen instructions to complete the installation process. This typically involves
selecting the installation directory and agreeing to the license terms.
Programming for IOT
3. Launch the Arduino IDE:
• After installation, you can launch the Arduino IDE by locating it in your applications folder (on
macOS) or using the desktop shortcut (on Windows).
• On Linux, you can typically launch the Arduino IDE from the Applications menu or by running the
Arduino command in the terminal.
4. Configure Arduino IDE Preferences (Optional):
• Before you start using the Arduino IDE, you may want to configure some preferences to customize
your development environment.
• You can access the preferences menu by navigating to "File" > "Preferences" in the Arduino IDE.
• Here, you can configure settings such as the default sketch folder, the editor font and size, and the
behaviour of the serial monitor.
Programming for IOT
5. Install Board Support for Arduino Boards:
• If you're using an official Arduino board (such as Arduino Uno, Arduino Mega, etc.), you don't need
to install additional board support as it comes pre-installed.
• However, if you're using a third-party board or a different hardware platform (e.g., ESP8266,
ESP32), you'll need to install the appropriate board support package.
• You can install board support packages by navigating to "Tools" > "Board" > "Boards Manager..." in
the Arduino IDE, searching for the desired board, and clicking the "Install" button.
6. Connect Your Arduino Board:
• Before you can upload sketches to your Arduino board, you need to connect it to your computer
using a USB cable.
• Make sure your Arduino board is properly connected and recognized by your computer. You may
need to install drivers for your Arduino board, depending on your operating system.
Programming for IOT
7. Upload a Sketch:
• Now that your Arduino IDE is set up and your board is connected, you can upload a sketch
(program) to your Arduino board.
• Open a sample sketch or write your own code in the Arduino IDE.
• Click the "Upload" button (a right-pointing arrow icon) in the IDE toolbar to compile and upload the
sketch to your Arduino board.
Programming for IOT
Introduction to Python programming: Python IDE, Raspberry Pi, Setup and
Installation of OS, Pin Configuration.
Python programming is a popular and versatile programming language known for its simplicity,
readability, and vast ecosystem of libraries and frameworks. It's widely used for web development, data
analysis, machine learning, automation, and more. When working with Python on a Raspberry Pi, you
have access to a powerful combination of hardware and software for building various projects.
Programming for IOT
Python IDE: -
1. Thonny: Thonny is a beginner-friendly Python IDE that comes pre-installed with Raspberry Pi OS. It
offers features such as code highlighting, debugging tools, and a simple user interface, making it suitable for
beginners.
2. IDLE: IDLE is another lightweight Python IDE that comes bundled with Python installations. It
provides a basic environment for writing and running Python scripts.
3. PyCharm: PyCharm is a more advanced IDE developed by JetBrains, offering features such as code
completion, refactoring, version control integration, and support for web development frameworks. While it's
not pre-installed on Raspberry Pi, you can install it manually if you prefer a more feature-rich development
environment.
Programming for IOT
Raspberry Pi: -
The Raspberry Pi is a series of small single-board computers developed in the United Kingdom by the
Raspberry Pi Foundation to promote teaching of basic computer science in schools and in developing
countries. It does not include peripherals (such as keyboards and mice). The Raspberry Pi is a low cost,
credit-card sized computer that plugs into a computer monitor or TV, and uses a standard keyboard and
mouse. It is a capable little device that enables people of all ages to explore computing, and to learn how to
program in languages like Scratch and Python. The Raspberry Pi is a credit-card-sized computer that costs
between $5 and $35. It's available anywhere in the world, and can function as a proper desktop computer or
be used to build smart devices. A Raspberry Pi is a general-purpose computer, usually with a Linux operating
system, and the ability to run multiple programs. Raspberry Pi is like the brain. Its primary advantage comes
in processing higher level processing capability. It’s a single board computer.
Programming for IOT
1.Setup and Installation of OS:
a. Download Raspberry Pi OS (formerly Raspbian):
• Visit the official Raspberry Pi website (https://www.raspberrypi.org/downloads/) and download the latest
version of Raspberry Pi OS.
• Choose the appropriate version based on your Raspberry Pi model (e.g., Raspberry Pi OS with Desktop,
Raspberry Pi OS Lite).
b.Flash the OS Image onto an SD Card:
• Use a tool like Raspberry Pi Imager (available for Windows, macOS, and Linux) to flash the
downloaded OS image onto an SD card.
• Insert the SD card into your computer's SD card reader.
• Open Raspberry Pi Imager and choose the downloaded OS image file, select the SD card as the
destination, and click "Write."
Programming for IOT
c. Boot Raspberry Pi:
• Once the flashing process is complete, safely eject the SD card from your computer and insert it into the
SD card slot on your Raspberry Pi.
• Connect peripherals such as a keyboard, mouse, monitor, and power supply to the Raspberry Pi.
• Power on the Raspberry Pi, and it should boot into the Raspberry Pi OS desktop environment.
d.Follow Setup Wizard:
• The first time you boot into Raspberry Pi OS, you'll be prompted to go through a setup wizard to
configure language, timezone, keyboard layout, password, and other settings.
• Follow the on-screen instructions to complete the setup process.
Programming for IOT
2.Pin Configuration:
• Raspberry Pi boards feature General Purpose Input/Output (GPIO) pins, which can be used to interface
with external electronic components such as LEDs, buttons, sensors, and more.
• GPIO pins are numbered and labeled on the Raspberry Pi board. Pin configuration can vary depending
on the Raspberry Pi model, so refer to the documentation for your specific model.
• GPIO pins can be accessed and controlled programmatically using libraries such as RPi.GPIO in Python
or WiringPi in C/C++.
• It's important to understand the pin numbering scheme used by Raspberry Pi (e.g., BCM numbering or
physical pin numbering) when working with GPIO pins in your projects.
• Additionally, some GPIO pins may have special functions or restrictions, so refer to the Raspberry Pi
documentation for guidance on pin usage and capabilities.
Programming for IOT
Implementation of IoT Applications with Raspberry Pi: -
1. Selecting Hardware Components:
• Choose the appropriate Raspberry Pi model based on your project requirements, considering factors
such as processing power, memory, connectivity options, and form factor.
• Select sensors, actuators, and communication modules based on the specific application requirements.
Common components include temperature sensors, motion sensors, cameras, motors, LED displays,
and wireless communication modules (e.g., Wi-Fi, Bluetooth, LoRa).
2. Setting Up Raspberry Pi:
• Install the operating system (e.g., Raspberry Pi OS) on the Raspberry Pi board following the setup and
installation instructions provided earlier.
• Connect peripherals such as keyboard, mouse, monitor, and power supply to the Raspberry Pi.
• Ensure that the Raspberry Pi is connected to the internet, either via Ethernet or Wi-Fi.
Programming for IOT
3. Writing Software Code:
• Develop software code to interact with sensors, process data, and control actuators using
programming languages such as Python, C/C++, or Java.
Utilize GPIO libraries (e.g., RPi.GPIO for Python) to interface with GPIO pins and communicate with
external hardware components.
• Implement logic for data acquisition, processing, and decision-making based on sensor readings and
application requirements.
• Incorporate libraries and APIs for communication with external services, cloud platforms, or other IoT
devices.
4. Connecting Sensors and Actuators:
• Wire sensors and actuators to the GPIO pins of the Raspberry Pi according to the pin configuration
and electrical specifications provided in the component datasheets.
Programming for IOT
• Ensure proper power supply and grounding for reliable operation of connected components.
• Use appropriate resistors, capacitors, and other electronic components as necessary to protect the
Raspberry Pi and connected devices from overvoltage, overcurrent, and other electrical hazards.
5. Testing and Debugging:
• Test the IoT application on the Raspberry Pi to verify sensor data acquisition, actuator control, and
communication functionalities.
• Monitor system behaviour, troubleshoot any issues or errors, and optimize code and hardware
configurations for performance and reliability.
6. Integration with Cloud Services:
• Integrate the Raspberry Pi-based IoT application with cloud services or platforms for data storage,
visualization, analytics, and remote management.
Programming for IOT
• Use protocols such as MQTT, HTTP, or WebSocket for communication between the Raspberry Pi and
cloud services.
• Implement security measures such as encryption, authentication, and access control to protect data and
ensure the integrity and confidentiality of IoT communications.
7. Deployment and Maintenance:
• Deploy the Raspberry Pi-based IoT solution in the target environment, whether it's a home, office,
industrial facility, or outdoor location.
• Monitor system performance, conduct periodic maintenance, and update software and firmware as
needed to address security vulnerabilities, add new features, or improve functionality.
Programming for IOT
THANK YOU
Introduction to Arduino Programming: Features of Arduino

More Related Content

Similar to Introduction to Arduino Programming: Features of Arduino

Arduino Programming Software Development
Arduino Programming Software DevelopmentArduino Programming Software Development
Arduino Programming Software Development
Sanjay Kumar
 
WORKING PRINCIPLE OF ARDUINO AND USING IT AS A TOOL FOR STUDY AND RESEARCH
WORKING PRINCIPLE OF ARDUINO AND USING IT AS A TOOL FOR STUDY AND RESEARCHWORKING PRINCIPLE OF ARDUINO AND USING IT AS A TOOL FOR STUDY AND RESEARCH
WORKING PRINCIPLE OF ARDUINO AND USING IT AS A TOOL FOR STUDY AND RESEARCH
ijdpsjournal
 
Arduino
ArduinoArduino
Arduino
Paras Bhanot
 
Unit 6 - PART2.pptx
Unit 6 - PART2.pptxUnit 6 - PART2.pptx
Unit 6 - PART2.pptx
BLACKSPAROW
 
Arduino Development For Beginners
Arduino Development For BeginnersArduino Development For Beginners
Arduino Development For Beginners
FTS seminar
 
Embedded L1_notes_unit2_architecture.pptx
Embedded L1_notes_unit2_architecture.pptxEmbedded L1_notes_unit2_architecture.pptx
Embedded L1_notes_unit2_architecture.pptx
aartis110
 
Report on arduino
Report on arduinoReport on arduino
Report on arduino
Ravi Phadtare
 
Introduction to Arduino.pptx
Introduction to Arduino.pptxIntroduction to Arduino.pptx
Introduction to Arduino.pptx
Akshat Bijronia
 
ARDUINO_presentation_by_Ravishankar_Pati.ppt
ARDUINO_presentation_by_Ravishankar_Pati.pptARDUINO_presentation_by_Ravishankar_Pati.ppt
ARDUINO_presentation_by_Ravishankar_Pati.ppt
DeanSchoolofElectric1
 
ARDUINO_presentation
ARDUINO_presentationARDUINO_presentation
ARDUINO_presentation
SubhodeepDey10
 
Arduino
ArduinoArduino
Arduino
vipin7vj
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduino
Damien Magoni
 
What are the different types of arduino boards
What are the different types of arduino boardsWhat are the different types of arduino boards
What are the different types of arduino boards
elprocus
 
Arduino mario y jimena
Arduino mario y jimenaArduino mario y jimena
Arduino mario y jimena
marienafuerez
 
Introduction to arduino
Introduction to arduinoIntroduction to arduino
Introduction to arduino
Mohamed Essam
 
Overview of the Intel® Internet of Things Developer Kit
Overview of the Intel® Internet of Things Developer KitOverview of the Intel® Internet of Things Developer Kit
Overview of the Intel® Internet of Things Developer Kit
Intel® Software
 
Intro arduino
Intro arduinoIntro arduino
Intro arduino
MaLcom MooNwalker
 
IoT Development Boards.pdf
IoT Development Boards.pdfIoT Development Boards.pdf
IoT Development Boards.pdf
SudhanshiBakre1
 
The Personal Assistant
The Personal AssistantThe Personal Assistant
Microcontroller arduino uno board
Microcontroller arduino uno boardMicrocontroller arduino uno board
Microcontroller arduino uno board
Gaurav
 

Similar to Introduction to Arduino Programming: Features of Arduino (20)

Arduino Programming Software Development
Arduino Programming Software DevelopmentArduino Programming Software Development
Arduino Programming Software Development
 
WORKING PRINCIPLE OF ARDUINO AND USING IT AS A TOOL FOR STUDY AND RESEARCH
WORKING PRINCIPLE OF ARDUINO AND USING IT AS A TOOL FOR STUDY AND RESEARCHWORKING PRINCIPLE OF ARDUINO AND USING IT AS A TOOL FOR STUDY AND RESEARCH
WORKING PRINCIPLE OF ARDUINO AND USING IT AS A TOOL FOR STUDY AND RESEARCH
 
Arduino
ArduinoArduino
Arduino
 
Unit 6 - PART2.pptx
Unit 6 - PART2.pptxUnit 6 - PART2.pptx
Unit 6 - PART2.pptx
 
Arduino Development For Beginners
Arduino Development For BeginnersArduino Development For Beginners
Arduino Development For Beginners
 
Embedded L1_notes_unit2_architecture.pptx
Embedded L1_notes_unit2_architecture.pptxEmbedded L1_notes_unit2_architecture.pptx
Embedded L1_notes_unit2_architecture.pptx
 
Report on arduino
Report on arduinoReport on arduino
Report on arduino
 
Introduction to Arduino.pptx
Introduction to Arduino.pptxIntroduction to Arduino.pptx
Introduction to Arduino.pptx
 
ARDUINO_presentation_by_Ravishankar_Pati.ppt
ARDUINO_presentation_by_Ravishankar_Pati.pptARDUINO_presentation_by_Ravishankar_Pati.ppt
ARDUINO_presentation_by_Ravishankar_Pati.ppt
 
ARDUINO_presentation
ARDUINO_presentationARDUINO_presentation
ARDUINO_presentation
 
Arduino
ArduinoArduino
Arduino
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduino
 
What are the different types of arduino boards
What are the different types of arduino boardsWhat are the different types of arduino boards
What are the different types of arduino boards
 
Arduino mario y jimena
Arduino mario y jimenaArduino mario y jimena
Arduino mario y jimena
 
Introduction to arduino
Introduction to arduinoIntroduction to arduino
Introduction to arduino
 
Overview of the Intel® Internet of Things Developer Kit
Overview of the Intel® Internet of Things Developer KitOverview of the Intel® Internet of Things Developer Kit
Overview of the Intel® Internet of Things Developer Kit
 
Intro arduino
Intro arduinoIntro arduino
Intro arduino
 
IoT Development Boards.pdf
IoT Development Boards.pdfIoT Development Boards.pdf
IoT Development Boards.pdf
 
The Personal Assistant
The Personal AssistantThe Personal Assistant
The Personal Assistant
 
Microcontroller arduino uno board
Microcontroller arduino uno boardMicrocontroller arduino uno board
Microcontroller arduino uno board
 

Recently uploaded

Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...
IJECEIAES
 
Adaptive synchronous sliding control for a robot manipulator based on neural ...
Adaptive synchronous sliding control for a robot manipulator based on neural ...Adaptive synchronous sliding control for a robot manipulator based on neural ...
Adaptive synchronous sliding control for a robot manipulator based on neural ...
IJECEIAES
 
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
Mukeshwaran Balu
 
digital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdfdigital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdf
drwaing
 
Literature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptxLiterature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptx
Dr Ramhari Poudyal
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
Kerry Sado
 
Technical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prismsTechnical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prisms
heavyhaig
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
zwunae
 
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODELDEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
gerogepatton
 
原版制作(unimelb毕业证书)墨尔本大学毕业证Offer一模一样
原版制作(unimelb毕业证书)墨尔本大学毕业证Offer一模一样原版制作(unimelb毕业证书)墨尔本大学毕业证Offer一模一样
原版制作(unimelb毕业证书)墨尔本大学毕业证Offer一模一样
obonagu
 
spirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptxspirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptx
Madan Karki
 
Swimming pool mechanical components design.pptx
Swimming pool  mechanical components design.pptxSwimming pool  mechanical components design.pptx
Swimming pool mechanical components design.pptx
yokeleetan1
 
14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application
SyedAbiiAzazi1
 
Low power architecture of logic gates using adiabatic techniques
Low power architecture of logic gates using adiabatic techniquesLow power architecture of logic gates using adiabatic techniques
Low power architecture of logic gates using adiabatic techniques
nooriasukmaningtyas
 
basic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdfbasic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdf
NidhalKahouli2
 
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECTCHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
jpsjournal1
 
This is my Environmental physics presentation
This is my Environmental physics presentationThis is my Environmental physics presentation
This is my Environmental physics presentation
ZainabHashmi17
 
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdfBPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
MIGUELANGEL966976
 
sieving analysis and results interpretation
sieving analysis and results interpretationsieving analysis and results interpretation
sieving analysis and results interpretation
ssuser36d3051
 
Modelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdfModelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdf
camseq
 

Recently uploaded (20)

Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...
 
Adaptive synchronous sliding control for a robot manipulator based on neural ...
Adaptive synchronous sliding control for a robot manipulator based on neural ...Adaptive synchronous sliding control for a robot manipulator based on neural ...
Adaptive synchronous sliding control for a robot manipulator based on neural ...
 
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
 
digital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdfdigital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdf
 
Literature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptxLiterature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptx
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
 
Technical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prismsTechnical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prisms
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
 
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODELDEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
 
原版制作(unimelb毕业证书)墨尔本大学毕业证Offer一模一样
原版制作(unimelb毕业证书)墨尔本大学毕业证Offer一模一样原版制作(unimelb毕业证书)墨尔本大学毕业证Offer一模一样
原版制作(unimelb毕业证书)墨尔本大学毕业证Offer一模一样
 
spirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptxspirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptx
 
Swimming pool mechanical components design.pptx
Swimming pool  mechanical components design.pptxSwimming pool  mechanical components design.pptx
Swimming pool mechanical components design.pptx
 
14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application
 
Low power architecture of logic gates using adiabatic techniques
Low power architecture of logic gates using adiabatic techniquesLow power architecture of logic gates using adiabatic techniques
Low power architecture of logic gates using adiabatic techniques
 
basic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdfbasic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdf
 
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECTCHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
 
This is my Environmental physics presentation
This is my Environmental physics presentationThis is my Environmental physics presentation
This is my Environmental physics presentation
 
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdfBPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
 
sieving analysis and results interpretation
sieving analysis and results interpretationsieving analysis and results interpretation
sieving analysis and results interpretation
 
Modelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdfModelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdf
 

Introduction to Arduino Programming: Features of Arduino

  • 1. Sanjivani Rural Education Society’s Sanjivani College of Engineering, Kopargaon-423 603 (An Autonomous Ins tute, Affiliated to Savitribai Phule Pune University, Pune) NACC ‘A’ Grade Accredited, ISO 9001:2015 Certified Department of Computer Engineering (NBA Accredited)
  • 2. Programming for IOT Subject- Internet of Things (CO312) Unit No: -2 Programming for IOT
  • 3. Programming for IOT Contents: Introduction to Arduino Programming: Features of Arduino, Board details, Setup and IDE. Introduction to Python programming: Python IDE, Basic programs on Raspberry Pi, Setup and Installation of OS, Pin Configuration, Implementation of IoT Applications with Raspberry Pi.
  • 4. Programming for IOT Introduction to Arduino Programming: Features of Arduino, Board details, Setup and IDE: - Arduino is a software as well as hardware platform that helps in making electronic projects. It is an opensource platform and has a variety of controllers and microprocessors. There are various types of Arduino boards used for various purposes. The Arduino is a single circuit board, which consists of different interfaces or parts. The board consists of the set of digital and analog pins that are used to connect various devices and components, which we want to use for the functioning of the electronic devices.
  • 5. Programming for IOT Features of Arduino: 1.Microcontroller-based: Arduino boards are equipped with microcontrollers from the Atmel AVR or ARM families, providing computational capabilities for controlling electronic circuits and interfacing with sensors, actuators, and other peripherals. 2.Open-source Hardware and Software: Arduino hardware designs are open-source, allowing users to study, modify, and manufacture their own boards. Additionally, the Arduino software platform, including the IDE and libraries, is open-source and freely available for download and modification. 3.Versatility: Arduino boards support a wide range of input and output options, including digital and analog pins, serial communication interfaces (UART, SPI, I2C), PWM (Pulse Width Modulation) outputs, and more, making them suitable for diverse projects and applications.
  • 6. Programming for IOT 4.Expandability: Arduino boards can be expanded with shields, which are add-on modules that provide additional functionality such as wireless connectivity (Wi-Fi, Bluetooth), motor control, GPS, display interfaces, and sensor integration. 5.Community Support: Arduino boasts a large and active community of users, developers, and enthusiasts who contribute to forums, tutorials, projects, and libraries, providing valuable resources for learning and troubleshooting. Arduino Board Details:
  • 7. Programming for IOT Arduino offers a variety of boards tailored to different requirements and applications. 1.Arduino Uno: features an ATmega328P microcontroller, digital and analog input/output pins, USB connectivity for programming and power, and a 16 MHz crystal oscillator. The Uno is an excellent choice for beginners due to its simplicity and versatility. 2.Arduino Mega: The Arduino Mega is similar to the Uno but offers more input/output pins, making it suitable for larger and more complex projects. It features an ATmega2560 microcontroller and is commonly used in projects requiring numerous connections and peripherals. 3.Arduino Nano: The Arduino Nano is a compact and breadboard-friendly version of the Uno, making it ideal for projects with space constraints. Despite its small size, it retains most of the Uno's features and is suitable for a wide range of applications.
  • 8. Programming for IOT 4.Arduino Leonardo: The Arduino Leonardo differs from the Uno by using an ATmega32u4 microcontroller with built-in USB functionality. This allows it to emulate a computer keyboard or mouse, making it suitable for projects involving HID (Human Interface Device) emulation. 5.Arduino Due: The Arduino Due is based on a more powerful microcontroller, the Atmel SAM3X8E ARM Cortex-M3 CPU. It offers significantly more processing power and memory compared to other Arduino boards, making it suitable for demanding applications such as audio processing and advanced robotics. 6.Arduino Pro Mini: The Arduino Pro Mini is a stripped-down version of the Uno, designed for users who require a smaller form factor and lower cost. It lacks onboard USB connectivity and requires an external programmer for uploading sketches, making it suitable for embedded applications where space is limited.
  • 9. Programming for IOT Setup and IDE: - 1. Download the Arduino IDE: • Visit the official Arduino website (https://www.arduino.cc/en/software) and navigate to the "Software" section. • Download the appropriate version of the Arduino IDE for your operating system (Windows, macOS, or Linux). 2. Install the Arduino IDE: • Once the download is complete, locate the downloaded file and run the installer. • Follow the on-screen instructions to complete the installation process. This typically involves selecting the installation directory and agreeing to the license terms.
  • 10. Programming for IOT 3. Launch the Arduino IDE: • After installation, you can launch the Arduino IDE by locating it in your applications folder (on macOS) or using the desktop shortcut (on Windows). • On Linux, you can typically launch the Arduino IDE from the Applications menu or by running the Arduino command in the terminal. 4. Configure Arduino IDE Preferences (Optional): • Before you start using the Arduino IDE, you may want to configure some preferences to customize your development environment. • You can access the preferences menu by navigating to "File" > "Preferences" in the Arduino IDE. • Here, you can configure settings such as the default sketch folder, the editor font and size, and the behaviour of the serial monitor.
  • 11. Programming for IOT 5. Install Board Support for Arduino Boards: • If you're using an official Arduino board (such as Arduino Uno, Arduino Mega, etc.), you don't need to install additional board support as it comes pre-installed. • However, if you're using a third-party board or a different hardware platform (e.g., ESP8266, ESP32), you'll need to install the appropriate board support package. • You can install board support packages by navigating to "Tools" > "Board" > "Boards Manager..." in the Arduino IDE, searching for the desired board, and clicking the "Install" button. 6. Connect Your Arduino Board: • Before you can upload sketches to your Arduino board, you need to connect it to your computer using a USB cable. • Make sure your Arduino board is properly connected and recognized by your computer. You may need to install drivers for your Arduino board, depending on your operating system.
  • 12. Programming for IOT 7. Upload a Sketch: • Now that your Arduino IDE is set up and your board is connected, you can upload a sketch (program) to your Arduino board. • Open a sample sketch or write your own code in the Arduino IDE. • Click the "Upload" button (a right-pointing arrow icon) in the IDE toolbar to compile and upload the sketch to your Arduino board.
  • 13. Programming for IOT Introduction to Python programming: Python IDE, Raspberry Pi, Setup and Installation of OS, Pin Configuration. Python programming is a popular and versatile programming language known for its simplicity, readability, and vast ecosystem of libraries and frameworks. It's widely used for web development, data analysis, machine learning, automation, and more. When working with Python on a Raspberry Pi, you have access to a powerful combination of hardware and software for building various projects.
  • 14. Programming for IOT Python IDE: - 1. Thonny: Thonny is a beginner-friendly Python IDE that comes pre-installed with Raspberry Pi OS. It offers features such as code highlighting, debugging tools, and a simple user interface, making it suitable for beginners. 2. IDLE: IDLE is another lightweight Python IDE that comes bundled with Python installations. It provides a basic environment for writing and running Python scripts. 3. PyCharm: PyCharm is a more advanced IDE developed by JetBrains, offering features such as code completion, refactoring, version control integration, and support for web development frameworks. While it's not pre-installed on Raspberry Pi, you can install it manually if you prefer a more feature-rich development environment.
  • 15. Programming for IOT Raspberry Pi: - The Raspberry Pi is a series of small single-board computers developed in the United Kingdom by the Raspberry Pi Foundation to promote teaching of basic computer science in schools and in developing countries. It does not include peripherals (such as keyboards and mice). The Raspberry Pi is a low cost, credit-card sized computer that plugs into a computer monitor or TV, and uses a standard keyboard and mouse. It is a capable little device that enables people of all ages to explore computing, and to learn how to program in languages like Scratch and Python. The Raspberry Pi is a credit-card-sized computer that costs between $5 and $35. It's available anywhere in the world, and can function as a proper desktop computer or be used to build smart devices. A Raspberry Pi is a general-purpose computer, usually with a Linux operating system, and the ability to run multiple programs. Raspberry Pi is like the brain. Its primary advantage comes in processing higher level processing capability. It’s a single board computer.
  • 16. Programming for IOT 1.Setup and Installation of OS: a. Download Raspberry Pi OS (formerly Raspbian): • Visit the official Raspberry Pi website (https://www.raspberrypi.org/downloads/) and download the latest version of Raspberry Pi OS. • Choose the appropriate version based on your Raspberry Pi model (e.g., Raspberry Pi OS with Desktop, Raspberry Pi OS Lite). b.Flash the OS Image onto an SD Card: • Use a tool like Raspberry Pi Imager (available for Windows, macOS, and Linux) to flash the downloaded OS image onto an SD card. • Insert the SD card into your computer's SD card reader. • Open Raspberry Pi Imager and choose the downloaded OS image file, select the SD card as the destination, and click "Write."
  • 17. Programming for IOT c. Boot Raspberry Pi: • Once the flashing process is complete, safely eject the SD card from your computer and insert it into the SD card slot on your Raspberry Pi. • Connect peripherals such as a keyboard, mouse, monitor, and power supply to the Raspberry Pi. • Power on the Raspberry Pi, and it should boot into the Raspberry Pi OS desktop environment. d.Follow Setup Wizard: • The first time you boot into Raspberry Pi OS, you'll be prompted to go through a setup wizard to configure language, timezone, keyboard layout, password, and other settings. • Follow the on-screen instructions to complete the setup process.
  • 18. Programming for IOT 2.Pin Configuration: • Raspberry Pi boards feature General Purpose Input/Output (GPIO) pins, which can be used to interface with external electronic components such as LEDs, buttons, sensors, and more. • GPIO pins are numbered and labeled on the Raspberry Pi board. Pin configuration can vary depending on the Raspberry Pi model, so refer to the documentation for your specific model. • GPIO pins can be accessed and controlled programmatically using libraries such as RPi.GPIO in Python or WiringPi in C/C++. • It's important to understand the pin numbering scheme used by Raspberry Pi (e.g., BCM numbering or physical pin numbering) when working with GPIO pins in your projects. • Additionally, some GPIO pins may have special functions or restrictions, so refer to the Raspberry Pi documentation for guidance on pin usage and capabilities.
  • 19. Programming for IOT Implementation of IoT Applications with Raspberry Pi: - 1. Selecting Hardware Components: • Choose the appropriate Raspberry Pi model based on your project requirements, considering factors such as processing power, memory, connectivity options, and form factor. • Select sensors, actuators, and communication modules based on the specific application requirements. Common components include temperature sensors, motion sensors, cameras, motors, LED displays, and wireless communication modules (e.g., Wi-Fi, Bluetooth, LoRa). 2. Setting Up Raspberry Pi: • Install the operating system (e.g., Raspberry Pi OS) on the Raspberry Pi board following the setup and installation instructions provided earlier. • Connect peripherals such as keyboard, mouse, monitor, and power supply to the Raspberry Pi. • Ensure that the Raspberry Pi is connected to the internet, either via Ethernet or Wi-Fi.
  • 20. Programming for IOT 3. Writing Software Code: • Develop software code to interact with sensors, process data, and control actuators using programming languages such as Python, C/C++, or Java. Utilize GPIO libraries (e.g., RPi.GPIO for Python) to interface with GPIO pins and communicate with external hardware components. • Implement logic for data acquisition, processing, and decision-making based on sensor readings and application requirements. • Incorporate libraries and APIs for communication with external services, cloud platforms, or other IoT devices. 4. Connecting Sensors and Actuators: • Wire sensors and actuators to the GPIO pins of the Raspberry Pi according to the pin configuration and electrical specifications provided in the component datasheets.
  • 21. Programming for IOT • Ensure proper power supply and grounding for reliable operation of connected components. • Use appropriate resistors, capacitors, and other electronic components as necessary to protect the Raspberry Pi and connected devices from overvoltage, overcurrent, and other electrical hazards. 5. Testing and Debugging: • Test the IoT application on the Raspberry Pi to verify sensor data acquisition, actuator control, and communication functionalities. • Monitor system behaviour, troubleshoot any issues or errors, and optimize code and hardware configurations for performance and reliability. 6. Integration with Cloud Services: • Integrate the Raspberry Pi-based IoT application with cloud services or platforms for data storage, visualization, analytics, and remote management.
  • 22. Programming for IOT • Use protocols such as MQTT, HTTP, or WebSocket for communication between the Raspberry Pi and cloud services. • Implement security measures such as encryption, authentication, and access control to protect data and ensure the integrity and confidentiality of IoT communications. 7. Deployment and Maintenance: • Deploy the Raspberry Pi-based IoT solution in the target environment, whether it's a home, office, industrial facility, or outdoor location. • Monitor system performance, conduct periodic maintenance, and update software and firmware as needed to address security vulnerabilities, add new features, or improve functionality.