Arduino coupled with low cost sensors is an incredible opportunity to mix electronic with Physics and to implement field data collection, IBSE and Home Labs (the other face of fliped classrooms)
This document provides information about the Arduino workshop. It discusses Arduino boards and their components. It describes the Arduino IDE and basic code structure using functions like pinMode(), digitalWrite(), and delay(). It also explains programming concepts like variables, loops, and using sensors and actuators with digital and analog input/output pins.
This document provides an overview of how to use Arduino microcontrollers for beginners. It explains what Arduino is, the basic components and programming structure used in Arduino, and how to get started with coding and hardware setup. The key aspects covered include computers and programming languages, microcontrollers and their applications, Arduino development boards, initial setup steps, basics of Arduino coding like initialization, setup, loop, and user defined functions. It also discusses analog and digital signals, serial communication, and tips for wiring and coding Arduino projects.
This document provides an overview of a lab on using Arduino. The schedule includes lectures on Arduino, installing drivers, and using an ultrasonic sensor. It defines Arduino as a hardware and software platform and describes the Arduino UNO board. It explains how to install the Arduino IDE and write programs with a setup and loop structure. Lab 1 demonstrates controlling an LED, and Lab 2 uses an ultrasonic sensor to measure distance. Lab 3 builds a minimum system using just an AVR chip.
The document provides an introduction to programming with Arduino. It explains that Arduino is an open-source hardware and software platform used to build interactive electronic projects. It consists of a microcontroller board that can be programmed and used to read and control sensors, LEDs, motors and more. The document outlines the basic steps to get started which include downloading the Arduino IDE, installing drivers, selecting the board type, and uploading a test "Blink" program to make an LED turn on and off. It also provides explanations of some core electronic components like resistors, LEDs, sensors and describes how to set up a simple temperature sensing project and store the sensor readings in a database.
This document contains code snippets for controlling an LED or reading sensor values using an Arduino board. The snippets demonstrate basic digital input/output functions like turning an LED on and off, fading an LED brightness over time, reading the state of a push button to control an LED, reading analog sensor values to control LED brightness, receiving serial data to set LED brightness, and sending mouse position data over serial.
The document provides an overview of Arduino, including what it is, common Arduino boards, digital and analog input/output, and example projects. Arduino is an open-source electronics prototyping platform that can be used to create interactive objects. It uses a simple hardware and software environment to program and develop prototypes. The Arduino Uno is one of the most commonly used boards, which contains an Atmega328 microcontroller, digital and analog pins, and can be programmed via USB. The document describes how to connect various components like LEDs, buttons, sensors and motors to an Arduino board.
The document provides an overview of Arduino sketch basics including comments, variables, functions, and common functions like pinMode(), digitalWrite(), and delay(). It describes how sketches use special setup() and loop() functions. It also gives examples of blinking an LED using these functions and techniques. Finally, it provides a problem to write a sketch that blinks an LED in Morse code for SOS using dot() and dash() functions.
The document provides instructions for using a push button to control an LED connected to an Arduino board. It first discusses the theory behind interfacing a button, explaining that pressing the button connects two pins and allows current to flow. It then describes a circuit using a button, resistor, and LED that takes advantage of the button's "falling edge" to detect when it is pressed. The code example checks the button's input pin value - if high, the LED is off, and if low, the LED is on, toggling the LED on and off with each button press.
This document provides an overview of Arduino programming and the Arduino platform. It discusses what Arduino is, what types of projects can be built with Arduino, and covers the basics of getting started, digital and analog inputs/outputs, Neopixels, and putting projects together. It also includes an agenda and summaries of the Arduino UNO board and common sensors that can be used.
I have prepared this presentation when I was studying at Western Region Campus. I along with some of my friends conducted training for junior students on Arduino. Its day-1 presentation.
This document is a project report submitted by four students to their professor for an Arduino-based Windows remote control project. The report includes an abstract, introduction to Arduino, details about the Arduino board and ATmega328 microcontroller, circuit diagram and working, software used, and testing conducted. It acknowledges the sources that helped in completing the project.
The document provides information about workshops on programming and electronics using Scratch and Arduino. It introduces programming concepts and what Arduino and Scratch are. It then describes 5 exercises that involve building simple circuits using components like buttons, LEDs, sensors, and servos to demonstrate programming concepts with Arduino and Scratch.
Arduino Workshop Day 2 - Advance Arduino & DIYVishnu
Arduino Workshop Day 2 - IR, Ultrasonic & Temperature - Humidity Sensor Interfacing & Do It Yourself - Line Follower, Light Follower & Obstacle Avoider.
The document introduces Arduino pins and their functions. It describes the different types of signals and then discusses the ATmega328p microcontroller used in Arduino boards. It details the various pin types on Arduino boards including power pins, analog input pins, digital I/O pins, Tx/Rx pins for serial communication, and special function pins. The pin functions described include power regulation, analog to digital conversion, digital input/output, serial data transmission/reception, and resetting the microcontroller.
This document provides an introduction to line follower competitions using Arduino microcontrollers. It discusses what a microcontroller is and types of Arduino boards. The coding structure is explained, covering data types, functions, control statements and loop statements. A workshop section describes how to control a DC motor using Arduino to rotate clockwise for 2 seconds and counter-clockwise for 5 seconds in an infinite loop.
This document provides an overview of electronics and coding workshops conducted by Cassiopeia Ltd in 2016. It covers topics like robots, sensors, Arduino, breadboards, LEDs, buttons, displays, games, colors, sound, radio, communication and more. Circuit diagrams and code examples are provided for projects involving sensors, inputs, outputs and microcontrollers. The document serves as a reference guide for makers and coders learning electronics and programming.
This document provides an outline and overview of the topics that will be covered in Lecture 6 of the CSE P567 course, including the ATmega328 architecture, I/O pins, the Arduino C++ language, and timing functions. It discusses the ATmega328's Harvard architecture with separate flash, SRAM, and EEPROM memory spaces. It describes the AVR CPU, registers, addressing modes, instruction set, and I/O functionality. It also covers the Arduino development board's pin mapping and digital/analog I/O functions.
hands-on Arduino introduction making a sequencer to send 3 channels of pulse signals to a drum chip (Arduino based dsp-D8)
designed for 2 workshops at Sonar Hong Kong, 17 March 2018
Arduino Workshop Day 1 Slides
Basics of Arduino - Introduction, Basics of Circuits, Signals & Electronics, LED Interfacing, Switch, Buzzer, LCD & Bluetooth Communication.
This document provides information about different types of sensors, including infrared (IR), temperature, and sound sensors. It discusses the basic working principles of IR sensors, including how they detect objects based on reflected IR light. The document also describes temperature sensors that output a voltage proportional to temperature. Finally, it explains how sound sensors use a microphone and 555 timer integrated circuit to measure sound pressure variations and generate pulses. Key components discussed include the LM358 comparator, LM35 temperature sensor, and operating modes of the 555 timer IC like monostable, bistable, and astable.
- The document describes several introductory workshops on programming and electronics using Arduino and Scratch.
- It explains what programming and Arduino are, how to program Arduino boards, and how to interface Arduino with Scratch through the Scratch 4 Arduino software.
- Several exercises are presented that demonstrate how to build simple circuits and write programs to control outputs like LEDs using inputs like buttons, sensors and potentiometers.
1. Arduino is an open-source hardware and software platform used for building electronics projects. It contains a microcontroller and can be programmed using C code.
2. Arduino boards have digital and analog input/output pins that can sense the environment by receiving signals from sensors and control devices like motors. Common boards include the Uno, Due, and LilyPad.
3. The basic structure of an Arduino program includes a setup() function for initialization and a loop() function containing the main code. Functions like digitalWrite(), analogRead(), and Serial.print() are used to control pins, read sensors, and display output.
An Arduino is an open-source electronics prototyping platform based around flexible, easy-to-use hardware and software. It contains a microchip which can be programmed to sense inputs from sensors or buttons and control outputs like LEDs or motors. It is used to create interactive objects or environments. The Arduino software runs on Windows, Mac, and Linux and is used to write programs, or "sketches", that are then uploaded to the Arduino board. Basic circuits and programming concepts are explained through examples of blinking an LED and controlling it with a potentiometer or switch.
This document provides an overview of analog input and output on the Arduino board. It discusses how analog output works using pulse-width modulation (PWM) on pins 3, 5, 6, 9, 10, and 11. It explains how to write analog values from 0-255 using the analogWrite() function. Examples are provided to fade an LED and have simultaneous fading and blinking. For analog input, it discusses using a potentiometer or photocell connected to pins A0-A5 and reading values from 0-1023 using analogRead(). Examples control an LED based on the analog reading. The document also discusses communicating between Arduino and Processing using the serial port.
This document provides an introduction to using Arduino boards. It discusses getting started with the Arduino IDE, programming basics like digital I/O and timing functions. Examples are provided to blink an LED, read a digital sensor, read an analog sensor with a potentiometer, and fade an LED using pulse width modulation. Terminology around bits, bytes and serial communication is also explained. The document aims to teach Arduino fundamentals and provide practice examples for learning.
The document provides instructions for using a push button to control an LED connected to an Arduino board. It first discusses the theory behind interfacing a button, explaining that pressing the button connects two pins and allows current to flow. It then describes a circuit using a button, resistor, and LED that takes advantage of the button's "falling edge" to detect when it is pressed. The code example checks the button's input pin value - if high, the LED is off, and if low, the LED is on, toggling the LED on and off with each button press.
This document provides an overview of Arduino programming and the Arduino platform. It discusses what Arduino is, what types of projects can be built with Arduino, and covers the basics of getting started, digital and analog inputs/outputs, Neopixels, and putting projects together. It also includes an agenda and summaries of the Arduino UNO board and common sensors that can be used.
I have prepared this presentation when I was studying at Western Region Campus. I along with some of my friends conducted training for junior students on Arduino. Its day-1 presentation.
This document is a project report submitted by four students to their professor for an Arduino-based Windows remote control project. The report includes an abstract, introduction to Arduino, details about the Arduino board and ATmega328 microcontroller, circuit diagram and working, software used, and testing conducted. It acknowledges the sources that helped in completing the project.
The document provides information about workshops on programming and electronics using Scratch and Arduino. It introduces programming concepts and what Arduino and Scratch are. It then describes 5 exercises that involve building simple circuits using components like buttons, LEDs, sensors, and servos to demonstrate programming concepts with Arduino and Scratch.
Arduino Workshop Day 2 - Advance Arduino & DIYVishnu
Arduino Workshop Day 2 - IR, Ultrasonic & Temperature - Humidity Sensor Interfacing & Do It Yourself - Line Follower, Light Follower & Obstacle Avoider.
The document introduces Arduino pins and their functions. It describes the different types of signals and then discusses the ATmega328p microcontroller used in Arduino boards. It details the various pin types on Arduino boards including power pins, analog input pins, digital I/O pins, Tx/Rx pins for serial communication, and special function pins. The pin functions described include power regulation, analog to digital conversion, digital input/output, serial data transmission/reception, and resetting the microcontroller.
This document provides an introduction to line follower competitions using Arduino microcontrollers. It discusses what a microcontroller is and types of Arduino boards. The coding structure is explained, covering data types, functions, control statements and loop statements. A workshop section describes how to control a DC motor using Arduino to rotate clockwise for 2 seconds and counter-clockwise for 5 seconds in an infinite loop.
This document provides an overview of electronics and coding workshops conducted by Cassiopeia Ltd in 2016. It covers topics like robots, sensors, Arduino, breadboards, LEDs, buttons, displays, games, colors, sound, radio, communication and more. Circuit diagrams and code examples are provided for projects involving sensors, inputs, outputs and microcontrollers. The document serves as a reference guide for makers and coders learning electronics and programming.
This document provides an outline and overview of the topics that will be covered in Lecture 6 of the CSE P567 course, including the ATmega328 architecture, I/O pins, the Arduino C++ language, and timing functions. It discusses the ATmega328's Harvard architecture with separate flash, SRAM, and EEPROM memory spaces. It describes the AVR CPU, registers, addressing modes, instruction set, and I/O functionality. It also covers the Arduino development board's pin mapping and digital/analog I/O functions.
hands-on Arduino introduction making a sequencer to send 3 channels of pulse signals to a drum chip (Arduino based dsp-D8)
designed for 2 workshops at Sonar Hong Kong, 17 March 2018
Arduino Workshop Day 1 Slides
Basics of Arduino - Introduction, Basics of Circuits, Signals & Electronics, LED Interfacing, Switch, Buzzer, LCD & Bluetooth Communication.
This document provides information about different types of sensors, including infrared (IR), temperature, and sound sensors. It discusses the basic working principles of IR sensors, including how they detect objects based on reflected IR light. The document also describes temperature sensors that output a voltage proportional to temperature. Finally, it explains how sound sensors use a microphone and 555 timer integrated circuit to measure sound pressure variations and generate pulses. Key components discussed include the LM358 comparator, LM35 temperature sensor, and operating modes of the 555 timer IC like monostable, bistable, and astable.
- The document describes several introductory workshops on programming and electronics using Arduino and Scratch.
- It explains what programming and Arduino are, how to program Arduino boards, and how to interface Arduino with Scratch through the Scratch 4 Arduino software.
- Several exercises are presented that demonstrate how to build simple circuits and write programs to control outputs like LEDs using inputs like buttons, sensors and potentiometers.
1. Arduino is an open-source hardware and software platform used for building electronics projects. It contains a microcontroller and can be programmed using C code.
2. Arduino boards have digital and analog input/output pins that can sense the environment by receiving signals from sensors and control devices like motors. Common boards include the Uno, Due, and LilyPad.
3. The basic structure of an Arduino program includes a setup() function for initialization and a loop() function containing the main code. Functions like digitalWrite(), analogRead(), and Serial.print() are used to control pins, read sensors, and display output.
An Arduino is an open-source electronics prototyping platform based around flexible, easy-to-use hardware and software. It contains a microchip which can be programmed to sense inputs from sensors or buttons and control outputs like LEDs or motors. It is used to create interactive objects or environments. The Arduino software runs on Windows, Mac, and Linux and is used to write programs, or "sketches", that are then uploaded to the Arduino board. Basic circuits and programming concepts are explained through examples of blinking an LED and controlling it with a potentiometer or switch.
This document provides an overview of analog input and output on the Arduino board. It discusses how analog output works using pulse-width modulation (PWM) on pins 3, 5, 6, 9, 10, and 11. It explains how to write analog values from 0-255 using the analogWrite() function. Examples are provided to fade an LED and have simultaneous fading and blinking. For analog input, it discusses using a potentiometer or photocell connected to pins A0-A5 and reading values from 0-1023 using analogRead(). Examples control an LED based on the analog reading. The document also discusses communicating between Arduino and Processing using the serial port.
This document provides an introduction to using Arduino boards. It discusses getting started with the Arduino IDE, programming basics like digital I/O and timing functions. Examples are provided to blink an LED, read a digital sensor, read an analog sensor with a potentiometer, and fade an LED using pulse width modulation. Terminology around bits, bytes and serial communication is also explained. The document aims to teach Arduino fundamentals and provide practice examples for learning.
4 IOT 18ISDE712 MODULE 4 IoT Physical Devices and End Point-Aurdino Uno.pdfJayanthi Kannan MK
The document discusses the Arduino Uno microcontroller board. It provides details about the Arduino platform and describes the Arduino Uno board, which is based on the ATmega328P microcontroller. It lists the main components of the Arduino Uno board and explains the functions of pins and inputs/outputs. The document also provides an overview of the fundamentals of Arduino programming, including key functions, variables, conditions, and serial communication.
This document provides an overview of Arduino programming concepts including:
- Microcontrollers contain a CPU, memory, input/output pins and other peripherals on a single integrated circuit.
- Arduino is an open-source electronics platform with a microcontroller, pins to connect circuits, and software to program it.
- The core Arduino functions include setup(), loop(), pinMode(), digitalWrite(), digitalRead(), analogWrite(), analogRead(), and delay().
- Examples demonstrate blinking LEDs, reading input, using conditions and loops, arrays, LCD displays, and controlling servo motors.
- Arduino programming provides an accessible way to learn embedded systems and interact with circuits.
This document provides an introduction to microcontrollers and electronics basics using Arduino and RedBoard microcontrollers. It covers topics such as Arduino and RedBoard overview, downloading the Arduino IDE, connecting boards to computers, installing drivers, selecting boards and serial devices in the IDE interface, and an overview of the key areas of the Arduino GUI. It also introduces basic electronics concepts like circuits, Ohm's Law, analog and digital signals. Several example circuits are presented to blink an LED, read input from a potentiometer to control blink rate, use a light sensor to control an LED, and read temperature from a sensor.
IoT Basics with few Embedded System Connections for sensorssaritasapkal
This document provides information about a two-day workshop on IoT and embedded systems. The workshop will cover topics such as what IoT is, applications of IoT, Arduino, microcontrollers, sensors like LM35 and MQ2, programming with Arduino, and examples of coding for tasks like blinking an LED and reading from temperature and gas sensors. Hands-on sessions are included to allow participants to work with the Arduino development board, sensors, and programming.
Mechatronics is a multidisciplinary field that refers to the skill sets needed in the contemporary, advanced automated manufacturing industry. At the intersection of mechanics, electronics, and computing, mechatronics specialists create simpler, smarter systems. Mechatronics is an essential foundation for the expected growth in automation and manufacturing.
Mechatronics deals with robotics, control systems, and electro-mechanical systems.
The document provides an overview of the Arduino Uno microcontroller board. It describes the main components of the board including 14 digital input/output pins, 6 analog inputs, a 16MHz crystal oscillator, a USB connection, a power jack, and a reset button. It also explains how to power the board using a USB cable connected to a computer or an external power supply. The document then introduces some basic Arduino programming concepts like functions, data types, control structures, and input/output functions.
The document discusses the Arduino Nano development board. It provides an overview of the board's specifications including its microcontroller, operating voltage, analog and digital pins, memory, and communication interfaces. It also compares the Nano to the Arduino Uno and Arduino Mega boards, highlighting their differences in size, programming, and technical specifications. The document then provides instructions on how to power and program the Nano board using the Arduino IDE and examples.
The introduction to Arduino labs at Malmö University. These slides have been handed down since the beginning of Arduino. They have more authors then i can remember and should by no means be considered mine.
The introduction to Arduino labs at Malmö University. These slides have been handed down since the beginning of Arduino. They have more authors then i can remember and should by no means be considered mine.
The document provides an overview of topics related to interfacing sensors and actuators with Arduino microcontrollers. It discusses basic I/O components, sensor interfacing including ultrasonic, IR, temperature and motion sensors. It also covers actuators, motor control, LCD displays and programming concepts for Arduino like digital and analog I/O, PWM and interrupts. References for further reading on Arduino programming are also provided.
This document outlines the syllabus for a course on Internet of Things (IoT) technology taught by Dr. Syed Mustafa at HKBK College of Engineering, Bengaluru. It covers key modules including IoT physical devices and endpoints such as Arduino and Raspberry Pi. The Arduino section describes the Arduino microcontroller board and its components. It also covers Arduino programming basics like setup and loop functions, input/output functions, variables, conditional statements, and serial communication. The Raspberry Pi section provides an overview of the single-board computer and its hardware layout.
The document describes an Arduino-based home automation system that can sense various parameters like temperature, distance, light, and detect burglars. It transmits the sensor data to an Arduino board which processes the data and checks it against the program code to control devices like fans accordingly. The system also allows users to set alerts. It then provides details about Arduino programming, including the languages, code structure, and functions used. It gives an example of a circuit and code to light LEDs and explains various Arduino functions like pinMode(), digitalWrite(), analogRead() etc.
This lab aims to program an Arduino Uno board to blink an LED connected to pin 13. The document outlines the necessary materials, provides background on the Arduino board and IDE, and gives step-by-step instructions to write a simple program using the setup() and loop() functions that uses digitalWrite() and delay() to toggle the pin on and off, blinking the LED.
IoT Arduino UNO, RaspberryPi with Python, RaspberryPi Programming using Pytho...Jayanthi Kannan MK
Module 4 : Arduino UNO, RaspberryPi with Python
Arduino UNO: Introduction to Arduino,
•Arduino UNO, Installing the Software,
•Fundamentals of Arduino Programming.
•IoT Physical Devices and Endpoints.
RaspberryPi: Introduction to RaspberryPi,
•About the RaspberryPi Board: Hardware Layout,
•Operating Systems on RaspberryPi, Configuring.
Module 5 : RaspberryPi Programming using Python and Smart City
RaspberryPi,
•Programming RaspberryPi with Python,
•Wireless Temperature Monitoring System Using Pi,
•DS18B20 Temperature Sensor,
•Connecting Raspberry Pi via SSH,
•Accessing Temperature from DS18B20 sensors,
• Remote access to RaspberryPi.
Smart cities: Smart and Connected Cities,
•An IoT Strategy for Smarter Cities,
•Smart City IoT Architecture,
•Smart City Security Architecture,
•Smart City Use-Case Examples
Value Stream Mapping Worskshops for Intelligent Continuous SecurityMarc Hornbeek
This presentation provides detailed guidance and tools for conducting Current State and Future State Value Stream Mapping workshops for Intelligent Continuous Security.
RICS Membership-(The Royal Institution of Chartered Surveyors).pdfMohamedAbdelkader115
Glad to be one of only 14 members inside Kuwait to hold this credential.
Please check the members inside kuwait from this link:
https://www.rics.org/networking/find-a-member.html?firstname=&lastname=&town=&country=Kuwait&member_grade=(AssocRICS)&expert_witness=&accrediation=&page=1
Passenger car unit (PCU) of a vehicle type depends on vehicular characteristics, stream characteristics, roadway characteristics, environmental factors, climate conditions and control conditions. Keeping in view various factors affecting PCU, a model was developed taking a volume to capacity ratio and percentage share of particular vehicle type as independent parameters. A microscopic traffic simulation model VISSIM has been used in present study for generating traffic flow data which some time very difficult to obtain from field survey. A comparison study was carried out with the purpose of verifying when the adaptive neuro-fuzzy inference system (ANFIS), artificial neural network (ANN) and multiple linear regression (MLR) models are appropriate for prediction of PCUs of different vehicle types. From the results observed that ANFIS model estimates were closer to the corresponding simulated PCU values compared to MLR and ANN models. It is concluded that the ANFIS model showed greater potential in predicting PCUs from v/c ratio and proportional share for all type of vehicles whereas MLR and ANN models did not perform well.
Reese McCrary_ The Role of Perseverance in Engineering Success.pdfReese McCrary
Furthermore, perseverance in engineering goes hand in hand with ongoing professional growth. The best engineers never stop learning. Whether improving technical skills or learning new software tools, they understand that innovation doesn’t stop with completing one project. They habitually stay current with the latest advancements, seeking continuous improvement and refining their expertise.
ADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITYijscai
With the increased use of Artificial Intelligence (AI) in malware analysis there is also an increased need to
understand the decisions models make when identifying malicious artifacts. Explainable AI (XAI) becomes
the answer to interpreting the decision-making process that AI malware analysis models use to determine
malicious benign samples to gain trust that in a production environment, the system is able to catch
malware. With any cyber innovation brings a new set of challenges and literature soon came out about XAI
as a new attack vector. Adversarial XAI (AdvXAI) is a relatively new concept but with AI applications in
many sectors, it is crucial to quickly respond to the attack surface that it creates. This paper seeks to
conceptualize a theoretical framework focused on addressing AdvXAI in malware analysis in an effort to
balance explainability with security. Following this framework, designing a machine with an AI malware
detection and analysis model will ensure that it can effectively analyze malware, explain how it came to its
decision, and be built securely to avoid adversarial attacks and manipulations. The framework focuses on
choosing malware datasets to train the model, choosing the AI model, choosing an XAI technique,
implementing AdvXAI defensive measures, and continually evaluating the model. This framework will
significantly contribute to automated malware detection and XAI efforts allowing for secure systems that
are resilient to adversarial attacks.
PRIZ Academy - Functional Modeling In Action with PRIZ.pdfPRIZ Guru
This PRIZ Academy deck walks you step-by-step through Functional Modeling in Action, showing how Subject-Action-Object (SAO) analysis pinpoints critical functions, ranks harmful interactions, and guides fast, focused improvements. You’ll see:
Core SAO concepts and scoring logic
A wafer-breakage case study that turns theory into practice
A live PRIZ Platform demo that builds the model in minutes
Ideal for engineers, QA managers, and innovation leads who need clearer system insight and faster root-cause fixes. Dive in, map functions, and start improving what really matters.
Cloud Platform Architecture over Virtualized Datacenters: Cloud Computing and
Service Models, Data Center Design and Interconnection Networks, Architectural Design of Compute and Storage Clouds, Public Cloud Platforms: GAE, AWS and Azure, Inter-Cloud
Resource Management.
The role of the lexical analyzer
Specification of tokens
Finite state machines
From a regular expressions to an NFA
Convert NFA to DFA
Transforming grammars and regular expressions
Transforming automata to grammars
Language for specifying lexical analyzers
2. Arduino Programming Course Learning
Module-01: Introduction
Module-02: Get started with programming
Module 3 – Digital and analog input receive
Module -4 – Let’s learn about the condition
Module -5 – Let’s learn about loop
Module-6 – How to use an array
Module -7 – All about the LCD display
Module-8 – How to code Servo Motor
3. Module-01: Introduction
Arduino is an open source programmable circuit board that can be
integrated into a wide variety of makerspace projects both simple
and complex. This board contains a microcontroller which is able
to be programmed to sense and control objects in the physical
world. By responding to sensors and inputs, the Arduino is able
to interact with a large array of outputs such as LEDs, motors and
displays. Because of it’s flexibility and low cost, Arduino has
become a very popular choice for makers and makerspaces
looking to create interactive hardware projects.
4. Arduino Types
There are various types of Arduino Boards such as Arduino Uno,
Arduino MEGA, Arduino NANO, Arduino Mini, Arduino Leonardo
etc. are common. Among them Arduino Uno, Arduino MEGA
and Arduino NANO are most common. Arduino MEGA has large
number of input/output pins. It has 54 input / output pins , 16
analog pins, 256 KB flash memory and 8 KB RAM. It is larger
than other Arduino Boards. Arduino NANO is used in case of
managing spaces . Besides , it has some special features such as
it’s pins can be taken off. However , Arduino Uno is the mostly
used Arduino.
6. Arduino Uno
1.Reset Button –This will
restart any code that is
loaded to the Arduino board
2.AREF – Stands for “Analog
Reference” and is used to set
an external reference voltage
3.Ground Pin –There are a few
ground pins on the Arduino
and they all work the same
4.Digital Input/Output – Pins 0-
13 can be used for digital
input or output
7. Arduino Uno
5.PWM –The pins marked with the (~)
symbol can simulate analog output
6.USB Connection – Used for powering
up your Arduino and uploading
sketches
7.TX/RX –Transmit and receive data
indication LEDs
8.ATmega Microcontroller – This is the
brains and is where the programs
are stored
9.Power LED Indicator –This LED
lights up anytime the board is
plugged in a power source
10.Voltage Regulator –This controls
the amount of voltage going into
the Arduino board
8. Arduino Types
11.DC Power Barrel Jack –This is
used for powering your Arduino
with a power supply
12. 3.3V Pin –This pin supplies 3.3
volts of power to your projects
13. 5V Pin –This pin supplies 5 volts
of power to your projects
14. Ground Pins – There are a few
ground pins on the Arduino and
they all work the same
15. Analog Pins – These pins can
read the signal from an analog
sensor and convert it to digital
They can output any value from
0 to 255.
9. Basic Functions of Arduino Programming
1) void setup(): Almost every program contains a void setup() function. It is used
to declare input and output.The commands inside this function are executed
once.
Syntax:
void setup( ) {
pinMode ( pin_number, INPUT); //sets the pin as INPUT
pinMode(pin_number,OUTPUT); //sets the pin as OUTPUT
}
2) pinMode( ):This is used to declare the state (INPUT/OUTPUT) of the pins.
3) void loop( ): The commands inside this function are executed for infinite
times.This function is mainly used to generate outputs.
Syntax:
void loop( ) {
digitalWrite ( pin_number, HIGH/LOW);
}
10. Basic Functions of Arduino Programming
4) digitalWrite( ):This function is used to give digital outputs. Digital
outputs have only two values – HIGH or LOW. HIGH means 5V and
LOW means 0V
5) analogWrite: This function is used to generate analog outputs.
Analog outputs have values from 0 to 255 and this values are
scaled between 0V to 5V.That is, analog-255=5V.
So, analog-1=(5/255)V
If, n is the analog output , then it’s value in volt is n*(5/255)V.
6) digitalRead( ): It is used to take digital input. It takes only two value
as input(HIGH/LOW).
7) analogRead( ): It is used to take analog input. It takes input value
from 0 to 1023.
11. Basic Functions of Arduino Programming
8) delay( ):This function is used to pause the work of Arduino . For example,
if a LED is lighting and at that moment delay(1000); instruction is
added , then the LED will be in HIGH state for 1000 miliseconds or 1
second.
Example:
void loop( ) {
digitalWrite(5,HIGH);
delay( 1000);
digitalWrite(5,LOW);
}
এই ক্ষেত্রে ৫ম পিত্রে connected LED টি ১০০০ পমপিত্রেত্রেন্ড জ্বত্রি
থােত্রে এেং ১০০০ পমপিত্রেত্রেন্ড ো ১ ক্ষেত্রেন্ড ির LED টি পেত্রে যাত্রে ।
9) Comments: Comments are used to make the program easy to
understand for others. It doesn’t perform anything.
12. Basic Functions of Arduino Programming
Must be included in every Program
1) Semicolons (;) after every statement.
2) Parenthesis( ) with every function.
3) Curly braces after every function declaration to write codes inside
it.
4) Some blue keywords such as INPUT,OUTPUT, HIGH, LOW etc.
13. Module-02:Get Started with Programming
LED Glowing:
Apparatus:Arduino, LED, Jumping
Wires
Code:
int led=13;
void setup( ) {
pinMode( led, OUTPUT);
}
void loop( ) {
digitalWrite( led, HIGH);
}
14. Basic Functions of Arduino Programming
Code Explanation:
In line-1, we declared an integer and
Initialized it with a value, led=13.
We connected the led to the 13th
pin of the arduino.Then ,we
declared the 13th pin as output
inside the void setup( ) function
using pinMode( ) function. Finally,
inside void loop( ) function ,we
declared the state of the LED as
HIGH.That’s why, the LED was
glowing.
16. Basic Functions of Arduino Programming
Code Explanation:
In line-1, we declared a variable and
Initialized it with a value, led=13.
Then, we declared the 13th pin as
OUTPUT pin inside the void setup( )
function using pinMode( ) function.
Then, we declared the state of the
LED as HIGH. So, the LED glowed.
Then, we used the delay( ) function
for 1000 miliseconds .As a result,
the LED was glowing for 1 second.
17. Basic Functions of Arduino Programming
Then, we again declared the state
of the LED as LOW. So, the LED
stopped glowing.As a result of
using the delay() function for 1s,
the LED state was unchanged for
1s.That means, the LED blinked for
once and it continued for infinite
Time as it was declared inside void
loop() function.
18. Basic Functions of Arduino Programming
Work of delay( ) function:
delay( ) function is used to declare a time duration
for an instruction to be executed. If we don’t
initialize it with a value, it will take 0 miliseconds as
a default value.
19. Module-03: Digital and analog input receive
Digital Input:
Apparatus: Arduino, LED,
Jumpers, Resistor
Code:
int led=13;
int input=4;
int value;
void setup( ) {
pinMode( led, OUTPUT);
pinMode( input, INPUT);
}
void loop( ) {
value=digitalRead(input);
digitalWrite( led, value);
}
20. Module-03:Digital and analog input receive
Code Explanation:
In our previous programs ,we
directly declared the values
of outputs . But in this
program ,we used
digitalWrite( ) function to
take digital input and used
the value as output. In this
case, if no input is connected
To the input terminal, then we
will get 0V as output from there.
21. Module-03:Digital and analog input receive
Analog Input:
Apparatus: Arduino, LED,
Jumpers, Potentiometer,
Resistor
Code:
int value;
void setup( ) {
pinMode(A0, INPUT);
Serial.begin(9600);
}
22. Module-03:Digital and analog input receive
void loop( ) {
value= analogRead(A0);
Serial.println(value);
}
Code Explanation:
Here, we have used a
Potentiometer which is a
3 terminal device and we
have printed the analog
values to the serial monitor.
23. Module-03:Digital and analog input receive
To initialize the analog
values to be printed in
the serial monitor, the
“Serial.begin(9600);”
command is used.We also
used the Serial.println( )
function to print analog
values to the Serial
monitor.
24. Module-03:Digital and analog input receive
Analog input as delay:
Apparatus: Arduino, LED,
Jumpers, Potentiometer,
Resistor.
Code:
int value;
int led=13;
void setup( ) {
pinMode(A0, INPUT);
pinMode( led, OUTPUT);
Serial.begin(9600);
}
26. Module-03:Digital and analog input receive
Code Explanation:
Here, we have used a
Potentiometer which is a
3 terminal device and we
have printed the analog
values to the serial
monitor.To initialize the
analog values to be printed in
the serial monitor, the
“Serial.begin(9600);”
command is used.
27. Module-03:Digital and analog input receive
We also used the
Serial.println( ) function
to print analog values to
the Serial monitor.Then,
we used the analog value
as the parameter of the
delay( ) function.
28. Module-04: Let’s learn about the condition
Conditionals(if-else):
Apparatus:Arduino, LED,
Jumpers
Code:
int led1=7;
int led2=6;
int led3=5;
int value=200;
void setup( ) {
pinMode( led1, OUTPUT);
pinMode( led1, OUTPUT);
pinMode( led1, OUTPUT);
}
30. Module-04: Let’s learn about the condition
else{
digitalWrite( led3, HIGH);
delay(1000);
digitalWrite( led3, LOW);
delay(1000);
}
}
31. Module-04: Let’s learn about the condition
Code Explanation:
Here, we used if – else if –
else- control structure to
control the blinking of
the LEDs. Here, we have
taken 3 pins and declared
them as OUTPUT inside
the void setup( ) function.
In those pins, we connected
3 LEDs. Inside void loop( )
function, we used 3 condition
to control the blinking of the LEDs
32. Module-04: Let’s learn about the condition
The if block will be
executed ; in case, the
value is smaller than or
equal to 500.The else if
block will work when the
value is greater than 500
but smaller than or equal
to 800.The else block will
work if the other blocks
doesn’t work. In this case,
value=200 which fulfills the if
condition. So, the if block will be
executed and the led1 will be blinking.
33. Module-04: Let’s learn about the condition
if- else condition using
analog value:
Apparatus: Arduino, LED,
Jumpers, Potentiometer
Code:
int led1=7;
int led2=6;
int led3=5;
int value;
void setup( ) {
pinMode( led1, OUTPUT);
pinMode( led2, OUTPUT);
pinMode( led3, OUTPUT);
pinMode(A0,INPUT);
Serial.begin(9600);
}
35. Module-04: Let’s learn about the condition
else{
digitalWrite( led3, HIGH);
delay(1000);
digitalWrite( led3, LOW);
delay(1000);
}
}
36. Module-04: Let’s learn about the condition
Code Explanation:
In this case, we have used
a potentiometer and took
an input from it.The
input value was used to
control the LED blinking.
We varied this value
varying the resistance of
the potentiometer. And the
rest of the code execution
was same as the previous
one.
37. Module -5: Let’s learn about loop
Blinking Multiple LED:
Apparatus: Arduino, LED,
Jumpers
Code:
int led1=13;
int led2=12;
int led3=11;
int led4=10;
int led5=9;
int led6=8;
42. Module -5: Let’s learn about loop
Code Explanation:
Here, we have taken 6 LEDs and
connected them to 8th to 13th pin of
the Arduino.Then, inside void setup( )
function we declared them as output
pins. Inside void loop( ) function, we
declared the states of the LEDs serially
and used the delay( ) function to
blink them.The code was too long.
We can do it with for loop very easily
and very shortly. Let’s learn some
looping….
43. Module -5: Let’s learn about loop
Structure of ‘for loop’:
for( initialization; condition ; increment /decrement) {
//Statements
}
Here, the ‘for’ keyword defines the for loop.Then, we have to
initialize a value of the loop controller variable.Then, we have
the loop terminating condition which is very important ;
otherwise, the loop will turn into an infinite loop.Then, we
have the statement that will change the value of the loop
controlling variable.This is also important to control the loop
execution.
44. Module -5: Let’s learn about loop
For example:
for( i=0;i<9; i++) {
print(“Bangladesh);
}
Here, the loop controlling variable is i. We have
initialized it with a value, i=0.The loop
terminating condition is ,i<9.That means, the
loop will be executed for i=0 to i=8.Then, we have
used the increment statement that increases the
value of i by 1 each time.And thus, the loop will be
executed for 9 times.
45. Module -5: Let’s learn about loop
Blinking Multiple LEDs
using for loop:
Apparatus: Arduino, LED,
Jumpers
Code:
int i;
void setup( ) {
for( i=8;i<=13; i++) {
pinMode( i, OUTPUT);
}
}
46. Module -5: Let’s learn about loop
void loop( ) {
for( i=8;i<=13; i++ ) {
digitalWrite( i, HIGH);
delay(1000);
digitalWrite( i, LOW);
delay(1000);
}
}
47. Module -5: Let’s learn about loop
Code Explanation:
Here, we have used the
for loop to declare 6 pins
connected with LEDs as
OUTPUT inside void
setup( ) function.Then,
we used the for loop
again to blink the LEDs
respectively.
In the loop, we initialized the
loop controller i as 8 and
increased it by 1 each time and
continued the loop up to i=13. And thus,
the LEDs were blinking respectively.
48. Module -5: Let’s learn about loop
Brightness control:
Introduction: Brightness
control means controlling
the output voltage; i.e,
increasing or decreasing
the output . In this case,
we will be taking multiple
values between 0 to 5V.
But, the digital pins give
only 0V or 5V.That’s why, we
have to use a PWM pin. PWM
means PulseWidth Modulation.
The 3rd ,5th,6th,9th,10th and 11th pins are
PWM pin.
49. Module -5: Let’s learn about loop
Apparatus: Arduino, LED,
Jumpers
Code:
int led =6;
int i;
void setup( ) {
pinMode( led, OUTPUT);
}
void loop( ) {
for( i=0;i<=255; i=i+5) {
analogWrite(led, i);
delay(50);
}
}
50. Module -5: Let’s learn about loop
Code Explanation:
Here, we have used the
for loop to control the
brightness of the LED.As
the output will have
multiple values between
0 and 255, we used the
analogWrite( ) function
instead of digitalWrite( )
function.We increased the
value of i by 5 each time up to
255 and used it as the brightness
controlling factor.
51. Module-06: How to use an array
Array Declaration:
Array is a collection of same type of data. It is a
derived data type and has a huge area of use in
programming. It’s structure is as below:
Array_name[size]={ };
Size means number of elements of the array.
For example:
Arduino[6]={ 4,5,6,3,8,7};
Here, we have an array named ‘Arduino’ and it has 6 elements.
This elements are connected to the 4th,5th,6th,3rd,8th, and 7th
pin of the Arduino respectively.
The advantage of using array is – we can change the order of the
LEDs very easily.
52. Module-06: How to use an array
Blinking LED using Array:
Apparatus: Arduino, LED,
Jumpers
Code:
int array[4]={3,6,8,11};
int i;
void setup( ) {
for( i=o ; i<4; i++){
pinMode(array[i],OUTPUT);
}
}
53. Module-06: How to use an array
void loop( ) {
for( i=0; i<4; i++) {
digitalWrite( array[i], HIGH);
delay(1000);
digitalWrite( array[i], LOW);
}
}
Code Explanation:
To access array elements, we
use array indexing.
54. Module-06: How to use an array
The indexing starts from
0 and the last index of an
array is (size-1). In this
case the last index of the
array is 3.We can access
the elements using
indexing as below:
array[0]=3;
array[1]=6;
array[2]=8;
array[3]=11;
55. Module-06: How to use an array
So, using a for loop, we
have accessed the array
elements and declared
them as output inside
void setup( ) function.
Using another for loop,
we have blinked the
LEDs.
56. Module-07: All about the LCD display
LCD Display:
LCD (Liquid Crystal Display) is a type of flat
panel display which uses liquid crystals in its
primary form of operation. It has 2 rows and 16
columns.That’s why, it has a rating of LCD 16X2.
LCDs have 16 pins- Rs pin, RW pin,V0 pin,Vcc pin,
Enable pin, GND pin, 8 DB(0-7) pin and 2 LED(A,C) pin.
Rs stands for Register Select, RW stands for Read/Write,V0 pin used
to generate contrast,Vcc is a Power pin, GND stands for Ground pin,
Enable pin enables the LCD and connects it with the arduino,DB0 to
DB7 pins are Data pin and LED pins are LED Cathode and Anode.
While coding LCD displays, we have to include a library named
LiquidCrystal.
57. Module-07: All about the LCD display
The syntax of declaring LCD is :
Name_of_the_Library_of_LCD
Name_of_the_LCD(rs,enable,db4,db5,db6,db7);
To print something in the LCD, we have to have
tell the pin numbers where (rs, enable, db4,
db5, db6, db7 ) these pins are connected in the
arduino.
Example:
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
As LCDs have 2 rows/ lines, to print
something in the second line we have to use the
command “lcd.setCursor(0,1);”.
58. Module-07: All about the LCD display
Printing in LCD:
Apparatus: Arduino, LCD,
Breadboard, Jumpers
Code:
#include<LiquidCrystal.h>
LiquidCrystal lcd(12,11,5,4,3,2);
void setup( ) {
lcd.begin(16,2);
lcd.print(“HelloWorld”);
lcd.setCursor(0,1);
lcd.print(“Bangladesh”);
}
void loop( ) {
}
59. Module-07: All about the LCD display
Code Explanation:
First of all, we included the library of
LCD display .Then, we declared the
pins where rs pin, enable pin, db4,
db5, db6 and db7 were connected
respectively.Then, we initialized the
LCD with the command
“lcd.begin(16,2);” to print
something in it.Then we printed the
first line and settled the cursor to
the 2nd line and printed the 2nd
line.
60. Module-07: All about the LCD display
Printing analog value in
the LCD Display:
Apparatus:Arduino, LCD,
Potentiometer, Jumpers,
Breadboard
Code:
#include<LiquidCrystal . h>
LiquidCrystal lcd(12,11,5,4,3,2);
int value;
void setup( ) {
pinMode(A0, INPUT);
lcd.begin(16,2);
}
61. Module-07: All about the LCD display
void loop( ) {
lcd.print( “SensorValue: ”
);
value=analogRead(A0);
lcd.setCursor(0,1);
lcd.print(value);
delay(50);
lcd.clear( )
}
62. Module-07: All about the LCD display
Code Explanation:
Here, we took an input
from the A0 pin and
printed the value in the
LCD display.The rest of
the program execution
was same as the previous
one.
63. Module-08: How to code Servo Motor
Servo Motor:
A servo motor is an electrical device which can
push or rotate an object with great precision. If
you want to rotate and object at some specific
angles or distance, then you use servo motor. It
is just made up of simple motor which run
through servo mechanism. Normal motors
continuously moves around 360 degrees where
servo motors rotation angle can be controlled.
Some of them can rotate up to 180 degrees and some
of them can rotate up to 360 degrees. It has 3 pins- GND pin,
Power pin and Signal pin. Signal pin is used to give commands from
Arduino.
64. Module-08: How to code Servo Motor
Coding a Servo Motor:
Apparatus: Arduino, Servo Motor
Code:
#include<Servo . h>
Servo myservo;
void setup( ){
myservo.attach(5);
}
void loop( ) {
myservo.write(90);
delay(500);
myservo.write(0);
delay(500);
}
65. Module-08: How to code Servo Motor
Code Explanation:
First of all, a library(Servo . h) for coding a servo
motor has been included.Then, we have
declared a servo motor named ‘myservo’ and
then we declared it’s connecting point in the
Arduino.Then, we used the “myservo.write(90);”
command to rotate it by 90 degrees.Then, after
delaying for 0.5s, we rotated back to 0 degree.
Finally, we created a loop of rotation between 0 to
90 degrees in every 0.5s.
66. Module-08: How to code Servo Motor
Controlling Servo Motor
using Analog value:
Apparatus: Arduino,
Servo Motor, Potentiometer
Code:
#include<Servo . h>
Servo myservo;
int value;
void setup( ) {
myservo.attach(5);
pinMode(A0, INPUT);
}
void loop( ) {
value=analogRead(A0);
value=map(value,0,1023,0,180);
myservo.write(value);
}
67. Module-08: How to code Servo Motor
Code Explanation:
In this case, we took an analog input and used
the analog value to control the servo motor.
For this, we have determined the analog
value using analogRead( ) function and stored
the value at the variable ‘value’.Then, we
mapped the variable ‘value’ using the “map(
value, 0, 1023, 0, 180);” command and stored
the value at the variable ‘value’.This will map
the analog values from 0 to 1023 in the form
of degrees from 0 to 180 degrees. And thus,
the rotation of the servo was related to the
analog value.
68. Project: DC Motor Control
DC Motor Control:
DC Motor controlling means controlling both
speed and direction of it’s rotation. We can do it
by controlling it’s input voltage and changing
the direction of entering current.To do this, we
will use PWM pins and a L298N DC Motor Driver.
PWM pins controls the input voltage and motor
driver controls both voltage and direction of
rotation of the motor by applying H-bridge
method. H- bridge has 4 switching elements.
70. Project: DC Motor Control
By activating two different switches from
opposite sides, we can change the direction of
current flow; and thus, we can control the
direction of rotation. In the motor driver, there
are two pins- ENA,ENB which are used to
enable and control the speed of the motor.There
are 4 more pins- IN1,IN2,IN3 and IN4 which are
used to control the rotation of the motor. If IN1 is
LOW and IN2 is HIGH, the motor will move
forward; in case, IN1 is HIGH and IN2 is LOW the motor
will move backward. If, both inputs are same(LOW/HIGH) ,the
motor will stop.
71. Project: DC Motor Control
Apparatus:
Arduino
L298N Motor Driver
Module
2 X DC Motors
Joystick Module
12V Battery
73. Project: DC Motor Control
The circuit was designed
according to the diagram.
For this, we have
connected the ENA, IN1,
IN2, IN3, IN4, ENB pins of
the L298N to the 11th,8th,
7th, 6th,10th pin of the
Arduino. We have
connected the 12V pin of the
L298N to the positive
terminal of the Power Supply and the
GND pin was connected to the GND pin
of the Arduino and the Negative
terminal of the Power Supply.
Then, we connected the Joystick module as
follows:
VCC to 5V,VER to A1, HOR to A0, GND to GND pin of
the Arduino.
77. Project: DC Motor Control
Code Explanation:
First of all, we have declared the pins of the
Joystick module and the motor driver .We also
declared four other variables for taking the
input values.Then, we declared the pins mode
inside the void setup( ) function.Then inside
void loop( ) function, we have used analogRead( )
function to take the input values.Then using this
values in conditional statements, we have
controlled the rotation of the motors. For this, we have used
the map( ) function to map the x_pos values less than 400 in
the form of values between 0 to 255. And, rotated the left motor in
clockwise direction making IN1 as LOW and IN2 as HIGH .
78. Project: DC Motor Control
Then, for x_pos values between 400 and 600,
stopped the left motor making both the inputs
LOW.Then, for x_pos values greater than 600,
we have rotated the left motor in anti-clockwise
direction making IN1 as HIGH and IN2 as LOW.
Similarly, for y_pos values less than 400, we
have rotated the right motor in clockwise
direction by making IN3 as LOW and IN4 as
HIGH. For y_pos values between 400 and 600, we
have stopped the right motor by making both the
inputs LOW. And for y_pos values greater than 600, we have rotated
the right motor in anti-clockwise direction by making IN3 as HIGH
and IN4 as LOW.