Loading…
Transcript

Level 5 Session 2

Before we start

Declaring Pins

Using pinMode();

We have to learn how to declare pins

(Input / Output)

Configures the specified pin to behave either as an input or an output.

For Inputs

pinMode(A0, INPUT);

Then we will use some statement to turn on a LED

For Outputs

pinMode(0, OUTPUT);

How to activate the buzzer

How to turn the LED ON/OFF

To activate the buzzer we will use the statement:

To turn the LED on you will use the statement:

digitalWrite(0, HIGH);

tone(0,2093,1000);

To turn the LED on you will use the statement:

digitalWrite(0, LOW);

Duration

Frequency

Pin

number

What's Next?

Lets make the first Project

Next time

we will learn

How to create a variable and make some operations on it

How to use the Touch Sensor

To use the touch sensor we will use the statement:

digitalRead(A0,HIGH);

Programming

Programming is a creative process done by programmers to instruct a robot on how to do a task

Types of Programming Languages

Visual Programming

There are 2 types of programming languages

Is a very simple way for programming via Drag and Drop

Visual

Code

But it's not customizable like coding.

Programming via coding

Is a term used for the statements written in a particular programming language

It's More customizable than Visual programming

Today we are going to learn:

  • Introduction to programming via code
  • Difference between Visual and code
  • Digital read & Digital write

Image by Tom Mooring