8&9 Classes Notes

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 29

JUNE

Week1 Introduction to Robotics and AI


ROBOTICS: -
Robotics is a branch of engineering and computer science that
involves the conception, design, manufacture and operation of
robots.
The objective of the robotics field is to create intelligent machines
that can assist humans in a variety of ways
S: - Science
T: - TECHNOLOGY
E: - ENGINEERING
M: - MATHEMACTICS

AI or (ARTIFICIAL INTELLIGENCE): -
AI is the ability of a computer or a robot controlled by a computer to
do tasks that are usually done by a human because they require
human’s intelligence and discernments.
Week2 Introduction to software (pictoblox)

This is the layout of pictoblox


This software is divided in two types of coding
1. Code block
2. Python code

1. CODE BLOCK: This layout is divided in 4 parts


(i) Block
(ii) Instructions /command area
(iii) Programming area
(iv) Output/ stage part
(i) Block: In this area we have set of blocks and each block
content set of instructions
(ii) Instructions /command area: In this area we find set of
commands it helps to write script or program.
(iii) Programming area: In this area we are going to write the
program depending on the task.
(iv) Output/ stage part: Here we can see the output of the
program.
Add extension: It is an extension where we have AI command.
To adding a new sprite there are 4 ways
1. Choose a sprite from the gallery
2. We can paint our own sprite
3. Surprise it means a random sprite will pop up
4. Upload it means we can upload an image from the computer
Background: We can upload any picture to background also.
Green Flag: It help to start the program and it’s a one of the way to
start the program.
Red Dot: It help to stop the program.

Week3 Basic program to make a sprite walk


Write a basic program to make sprite walk and turn if it reaches to
edge of screen.
When space key is pressed
Forever
Move 10 steps
Next costumes
Wait 0.1 seconds
Set rotation style left-right
If an edge bounce
JULY
Week1 Introduction to the python – to move the
sprite
Write a basic program to make sprite walk and turn if it reaches to
edge of screen (python coding)
sprite = Sprite('Tobi')
import time
sprite.setrotationstyle("left-right")
while 1:
sprite.move(10);
sprite.nextcostume();
sprite.bounceonedge();
time.sleep(0.1);

Week2 Following the mouse pointer and add new


extension to draw
In this program we are using add extension option to get the pen
command.

Week3&4 Introduction to Arduino Kit.


Arduino: It’s an open-source electronics platform
based on easy-to-use hardware and software.
In Arduino kit there are 3 main board
1. Arduino UNO Board
2. Bread Board
3. L293D Motor control/driver Board
Motor: An electric motor is a device used to convert
electrical energy into mechanical energy.
There are 2 types of motors
1. DC Gear motor
2. Micro servo motor
Jumper Wires: A jumper wire is an electric wire that
connects remote electric circuits used for printed
circuit boards. By attaching a jumper wire on the
circuits, it can be short-circuited and short-cut (jump)
to the electric circuit.
There are 3 types of jumper wires
1. Male to Male
2. Female to Female
3. Male to Female
Note: Male has pin whereas Female doesn’t have pins.
Arduino UNO Board: Arduino UNO is based on an
ATmega328P Micro controller. It is easy to use compared
to other boards, such as the Arduino Mega board, etc. The
board consists of digital and analog I/O pins, shields, and
other circuits.

The Arduino UNO includes 6 analog pin inputs, 14 digital


pins, a USB connector, a power jack. It is programmed
based on IDE, which stands for Integrated Development
Environment. It can run on both online and offline
platforms.
o ATmega328 Microcontroller- It is a single chip
Microcontroller of the Atmel family.
o Power LED Indicator - The ON status of LED shows
the power is activated. When the power is OFF,
the LED will not light up.
o Digital I/O pins- The digital pins have the value
HIGH or LOW. The pins numbered from D0 to D13
are digital pins.
o TX and RX LED's- The successful flow of data is
represented by the lighting of these LED's.
o Reset button- It is used to add a Reset button to
the connection.
o USB- It allows the board to connect to the
computer. It is essential for the programming of
the Arduino UNO board.
o Voltage Regulator- The voltage regulator converts
the input voltage to 5V.
o GND- Ground pins. The ground pin acts as a pin
with zero or negative voltage
o Vin- It is the input voltage.
o Analog Pins- The pins numbered from A0 to A5 are
analog pins. The function of Analog pins is to read
the analog sensor used in the connection.
Bread Board: The breadboard is a white rectangular
board with small embedded holes to insert electronic
components. It is commonly used in electronics projects.
We can also say that breadboard is a prototype that acts as
a construction base of electronics.

Motor Control/Driver Board: L293D IC is a typical Motor


Driver IC which allows the DC motor to drive on any
direction. This IC consists of 16-pins which are used to
control a set of two DC motors instantaneously in any
direction.
DC Gears Motor: A gear motor is an all-in-one
combination of a motor and gearbox. The addition of a
gearbox to a motor reduces the speed while increasing the
speed output.

Micro Servo Motor: Servo motor is a type of motor that is


powered by a DC source, either from an external supply or
by a controller. A small and lightweight servo motor with
high output power is called a micro servo motor Servo
motor works on PWM (Pulse width modulation) principle,
means its angle of rotation is controlled by the duration of
applied pulse to its Control PIN.
Jumper Wires

AUGUST
Week1 Grade Calculator In python coding.
Sprite = Sprite ('Tobi')
def grade(marks):
if marks > 85:
return "A"
elif marks > 70:
return "B"
elif marks > 60:
return "C"
elif marks > 45:
return "D"
else:
return "F"
sprite.input("what is your marks")
mark = int (sprite.answer())
sprite.say ("your grade is" + grade(mark), 2)
Week2 Introduction to software (Arduino) and LED
Blinking using Arduino.
Go to tools->ArduBlock.

Code block: In this area we have set of blocks and each block
content set of instructions

Instruction/command Area: In this area we find set of


commands it helps to write script or program.

Programming area: In this area we are going to write the


program depending on the task.
Upload to Arduino: It helps to upload a program from code
block to embedded code.

Serial Monitor: It helps to check the values of sensors.


Program for LED Blinking.

Interfacing LED using Arduino UNO Board


Week3 Buzzer with LED using Arduino Board

Buzzer Connections

Interfacing LED and Buzzer using Arduino UNO Board


Week4&5 Introduction to ultrasonic sensor
Ultrasonic Sensor: The ultrasonic sensor has a sender to
emit the ultrasonic waves and a receiver to receive the
ultrasonic waves. The transmitted ultrasonic wave travels
through the air and is reflected by hitting the Object.
Ultrasonic sensor Connections

Interfacing ultrasonic sensor using Arduino UNO and


Control the LED.
Trigger pin is connected to A0
Echo pin is connected to A1
GND (Ground) is connected to GND
VCC is connected to positive 5V.
September
Week 1: Revision for ultrasonic sensor.
Week 2&3: -
Week 4: Interfacing sound sensor with Arduino Uno
Board
Sound Sensor: The sound sensor is a device that detects sound
and converts it into an electrical signal. This signal can be processed
and interpreted by a microcontroller, such as an Arduino.

The most common sound sensors used with Arduino are the KY-038
and the LM393 microphone sound sensor.

1. Connect the VCC and GND pins of the sensor to the 5V and GND
pins of the Arduino board, respectively.
2. Connect the OUT pin of the sensor to any of the Arduino’s
Analog pins.
3. Process the signal to extract the desired information, such as the
sound level or the presence of a specific sound.

Here is an example of how to read the analog signal from the sound
sensor and light up LEDs to show the intensity of the sound received
by the microcontroller

Circuit connections of sound sensor:


Sound sensor

Interfacing sound sensor using Arduino UNO and


Control the LED.
October
Week1: Revision
Week2: Practical Exam.

Week 3: Written Exam


Week 4&5: Holidays.
November
Week1: Text classifier
Text classifier: It is a kind of classification which will sort
the text depending on their category of text.

Here are the steps to get started with text classification in


PictoBlox:

 Open PictoBlox and create a new file.


 Select the coding environment as either Block Coding or
Python Coding.
 To access the ML Environment, select the “Open ML
Environment” option under the “Files” tab.
 Click on “Create New Project”.
 Type in a project name of your choice and select the
“Text classifier” extension.

Steps to text classification:

Step1: Rename the class and add samples


Step 2: click on train model to train the classes.

Step3: Then test the text condition depending on their text


category.
Week2: Face expression recognition by using Face
expression detection.
Face expression detection: Facial expression play an
important role in recognition of emotions and are used in the
process of non-verbal communication.

Here we need to add Face expression detection extension by


using add extension.

There are 7 types of expression can be detected.

1. Happy
2. Sad
3. Surprised
4. Angry
5. Disgusted
6. Neutral
7. Fear
Write a program for Face expression recognition by using
Face Detection command.

Week 3: Image classification.


Image classification: Image classification in PictoBlox refers
to the process where the machine labels images into one of
the classes based on their characteristics. This can be done
using the Machine Learning Environment in PictoBlox.

Here are the steps to get started with image classification in


PictoBlox:

 Open PictoBlox and create a new file.


 Select the coding environment as either Block Coding or
Python Coding.
 To access the ML Environment, select the “Open ML
Environment” option under the “Files” tab.
 Click on “Create New Project”.
 Type in a project name of your choice and select the
“Image Classifier” extension.

Steps for the image classification

Step1: Add a sample of images by 2 options either by


upload from the computer or by an option as web cam.

Step2: After adding an image, we have to rename the class


name.

Step3: We have to train the model (training will take time).

Step 4: Then we have tested the image by using option


which ever we have selected as to add an image.

Step 5: To add multiple classes, we have to click on option


Add class which is below the class.

Week 4: Revision.
Week 5: Introduction of DC Gear motors.
DC Gears Motor: A gear motor is an all-in-one
combination of a motor and gearbox. The addition of a
gearbox to a motor reduces the speed while increasing the
speed output.

For making a car model we require 4 DC gear motors,


Arduino UNO board, L293D motor driver board, 2 lithium
batteries, battery holder 2 wooden plank, USB cable,
wires, few screws and bolts.
All four DC gear motors should face toward each other
and we have to connect the wires, each motors have 2
terminals.
December
Week1: Write a program for making a car model to move
forward and backward and teach them how to control the
speed of a motors.
Week 2: IR (Infrared Reflective) sensor.
IR sensor: There are two types of infrared sensors: active
and passive. Active infrared sensors both emit and detect
infrared radiation. Active IR sensors have two parts: a light
emitting diode (LED) and a receiver. When an object comes
close to the sensor, the infrared light from the LED reflects
off of the object and is detected by the receiver. Active IR
sensors act as and they are commonly used in obstacle
detection systems (such as in robots).
Circuit connections

All pins are on L293D motor driver


Motors connections are same, but only 2 motors
need to be connected.
Vcc is connected------> 5V
GND is connected-------> GND
Analog pin A0 is connected--------> A0
Build a model of robot with IR sensor and a write a
program for IR sensor to read the IR rays.

Week3&4: Holidays

January
Week1: Revision.
Week3&4: Micro Servo Motors.
Micro Servo Motor: Servo motor is a type of motor that is
powered by a DC source, either from an external supply or
by a controller. A small and lightweight servo motor with
high output power is called a micro servo motor Servo
motor works on PWM (Pulse width modulation) principle,
means its angle of rotation is controlled by the duration of
applied pulse to its Control PIN.

write the program for Servo motor to rotate in a certain


angle at particular direction.

Orange wire is control signal connected to digital


pin.
Red wire is Vcc connected to 5V.
Brown wire is GND connected to GND.
Circuit Connection for Micro servo motors.

Potentiometer: The potentiometer is an instrument


used to measure the unknown voltage by comparing
it with the known voltage.
Control Unit: A control unit in a micro servo motor
typically consists of a motor, a driver, an encoder,
and a controller. The motor is responsible for
converting electrical energy into mechanical energy.

Week5: Revision for Exam.


February

Week1: Revision for Exams

Week2: Practical Exam


Week3: Final Robotics Exam.

You might also like