Difference between revisions of "Sensing and making with Arduino"

From Interaction Station Wiki
Jump to navigation Jump to search
Line 57: Line 57:
 
'''Digital Input Pins''' (seven on the Uno): Across from the analog pins are the digital pins (0 through 13 on the UNO). These pins can be used for both digital ''input'' (like telling if a button is pushed) and digital ''output'' (like powering an LED). <br>
 
'''Digital Input Pins''' (seven on the Uno): Across from the analog pins are the digital pins (0 through 13 on the UNO). These pins can be used for both digital ''input'' (like telling if a button is pushed) and digital ''output'' (like powering an LED). <br>
 
[[File:Board_layout.PNG | 600 px]]<br>
 
[[File:Board_layout.PNG | 600 px]]<br>
<br>
+
 
[[File:Board_layout.PNG | 500 px]]<br>
 
 
In details: <br>
 
In details: <br>
 
[[File:Arduino-uno.png| 500px]]
 
[[File:Arduino-uno.png| 500px]]

Revision as of 10:18, 11 November 2024

Sensing and Making with Arduino

Building a interactive system

how is it made of - microcontroller and sensors physical computing

Examples

Microcontrollers like Arduino are involved in lots of works. Here are some examples:

What is Arduino

Arduino is a microcontroller, a type of device, like a small computer, designed to execute simple tasks. Arduino is used by a wide for building digital devices and interactive objects that can sense and control the physical world.

In essence Arduino is just another μController development board. The main purpose of such a μController development board is to make it easy for developers to evaluate the functions of, or create a quick prototype with, a certain type of μController. μControllers come in al sorts of tastes and sizes hence there are many different flavours of μController development boards as well. Do, for example, a Google search on microcontroller development board. You will see an abundance of different different platforms and most likely you will find some Arduino flavours there as well.

What makes an Arduino?

Arduino is composed of two major parts: the Arduino board, which is the piece of hardware you work on when you build your objects; and the Arduino IDE, the piece of software you run on your computer. You use the IDE to create a sketch (a little computer program) that you upload to the Arduino board. The sketch tells the board what to do. In the meantime, HERE you can find anything about Arduino, including download the software.
The Arduino board The Arduino IDE

Understanding the hardware

The Arduino board (and microcontrollers in general) is based on a simple input/output (I/O) logic. On the board you can see a series a pins, which are the places where you connect your external components (like LEDS, sensors and so on) through wires.They usually have black plastic ‘headers’ that allow you to just plug a wire right into the board.

The Arduino has different kinds of pins, each of which is labeled on the board and used for different functions.
Analog Input Pins ( we have six of them in the Uno): The area of pins under the ‘Analog In’ label (A0 through A5 on the UNO) are Analog In pins. These pins can read the signal from an analog sensor (like a temperature sensor) and convert it into a digital value that we can read.
Digital Input Pins (seven on the Uno): Across from the analog pins are the digital pins (0 through 13 on the UNO). These pins can be used for both digital input (like telling if a button is pushed) and digital output (like powering an LED).
Board layout.PNG

In details:
Arduino-uno.png

First things first: Let's blink a LED!

What is an LED

The LED

What is an LED?
LED is short for light emitting diode, is a semiconductor device that emits light when an electric current is passed through it. Light is produced when the particles that carry the current (electrons and holes) combine together within the semiconductor material.
LEDs come in different colors. Different semiconductor materials with different bandgaps (separation of the bands containing electrons and holes) produce different colors of light.
Anodecathode.jpegBattery led.gif
In an LED, energy flows in one direction, generating the luminous effect at the top, where the semiconductor is. LEDs have two legs, corresponding to the positive and negative side, also known as Anode and Cathode. These can be distinguished because the positive leg, the Anode, is longer than the other one. If we connect these two poles to a battery, the LED will turn on.

Connect Arduino to an LED

Wiring

Blink the light

Programming

-Install the Arduino IDE or your computer

Project 1: Interactive light

We are gonna start with our first Interactive project. We will use a light sensor to measure the light level of the room and turn on our led when the room gets dark.

Connect a light sensor

What is a light sensor

Wiring

Programming

Project 2: Distance detector

Connect Arduino to Servo motor

Servo Motor

Wiring

Programming

Make it Interactive!: Connect a Ultrasonic sensor

Wiring

Programming