ctps -2017 acivity physical computing · 2019-05-20 · open the firmware file (s4afirmware16.ino)...

52
CTPS - 2018 ACTIVITY PHYSICAL COMPUTING

Upload: others

Post on 04-Apr-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: CTPS -2017 ACIVITY PHYSICAL COMPUTING · 2019-05-20 · Open the firmware file (S4AFirmware16.ino) from the Arduino environment. e. STEP 5: Select board and port In the Tools menu,

CTPS -2018ACTIVITY PHYSICAL COMPUTING

Page 2: CTPS -2017 ACIVITY PHYSICAL COMPUTING · 2019-05-20 · Open the firmware file (S4AFirmware16.ino) from the Arduino environment. e. STEP 5: Select board and port In the Tools menu,

Detectable

physical

phenomena in

the Real

world

Acoustic

Biological & Chemical

Electric

Magnetic

Optical

Thermal

Mechanical

Stimulus

Page 3: CTPS -2017 ACIVITY PHYSICAL COMPUTING · 2019-05-20 · Open the firmware file (S4AFirmware16.ino) from the Arduino environment. e. STEP 5: Select board and port In the Tools menu,

Response to stimulus is an Electrical Signal

• By electrical we mean a signal

which can be channeled,

amplified and modified by

electronic devices:

• Voltage

• Current

• Charge

• The voltage, current or charge may

be describe by:

• Amplitude

• Frequency

• Phase

• Digital code

Page 4: CTPS -2017 ACIVITY PHYSICAL COMPUTING · 2019-05-20 · Open the firmware file (S4AFirmware16.ino) from the Arduino environment. e. STEP 5: Select board and port In the Tools menu,

Detectable Physical

phenomena in Real

world Sensor

Detects/measures a stimulus

A sensor receives stimulus and coverts it into electrical signals

Page 5: CTPS -2017 ACIVITY PHYSICAL COMPUTING · 2019-05-20 · Open the firmware file (S4AFirmware16.ino) from the Arduino environment. e. STEP 5: Select board and port In the Tools menu,

Detectable

Physical

phenomena in

Real

world

Sensor

Detects/measures a stimulus

actuator

Generates a stimulus

Sen

sors

an

d A

ctu

ato

rs

Page 6: CTPS -2017 ACIVITY PHYSICAL COMPUTING · 2019-05-20 · Open the firmware file (S4AFirmware16.ino) from the Arduino environment. e. STEP 5: Select board and port In the Tools menu,

Detectable

Physical

phenomena in Real

world

6 We can measure …• Motion, position, displacement

• Velocity and acceleration

• Force, strain

• Pressure

• Flow

• Sound

• Moisture

• Light

• Temperature

• Radiation

• Chemical presence

Page 7: CTPS -2017 ACIVITY PHYSICAL COMPUTING · 2019-05-20 · Open the firmware file (S4AFirmware16.ino) from the Arduino environment. e. STEP 5: Select board and port In the Tools menu,

Sti

mu

lus

& r

esp

on

ses Stimulus Quantity

Acoustic Wave (amplitude, phase, polarization), Spectrum, Wave Velocity

Biological &

Chemical

Fluid Concentrations (Gas or Liquid)

Electric Charge, Voltage, Current, Electric Field (amplitude, phase, polarization),

Conductivity, Permittivity.

Magnetic Magnetic Field (amplitude, phase, polarization), Flux, Permeability

Optical Refractive Index, Reflectivity, Absorption

Thermal Temperature, Flux, Specific Heat, Thermal Conductivity

Mechanical Position, Velocity, Acceleration, Force, Strain, Stress, Pressure, Torque

Page 8: CTPS -2017 ACIVITY PHYSICAL COMPUTING · 2019-05-20 · Open the firmware file (S4AFirmware16.ino) from the Arduino environment. e. STEP 5: Select board and port In the Tools menu,

• A Sensor converts the physical parameter ( temperature, blood pressure,

humidity, speed, etc.) into a signal which can be measured electrically.

• It responds to any change in physical phenomena or environmental variables like heat,

pressure, humidity, movement etc.

• This change affects the physical, chemical or electromagnetic properties of the sensors

which is further processed to a more usable and readable form.

• Sensors are used to measure a particular characteristic of any object or device.

• The signal produced by the sensor is equivalent to the quantity to be

measured.

• An analog sensor converts the physical quantity being measured to analog

form (continuous in time). A digital sensor produces output in the form of

pulse.

Page 9: CTPS -2017 ACIVITY PHYSICAL COMPUTING · 2019-05-20 · Open the firmware file (S4AFirmware16.ino) from the Arduino environment. e. STEP 5: Select board and port In the Tools menu,

Temperature, Light sensors

• Temperature sensors appear in building, chemical

process plants, engines, appliances, computers, and

many other devices that require temperature

monitoring

• Many physical phenomena depend on temperature,

so we can often measure temperature indirectly by

measuring pressure, volume, electrical resistance,

and strain

• Light sensors are used in cameras, infrared

detectors, and ambient lighting

applications

• Sensor is composed of photoconductor

such as a photoresistor, photodiode, or

phototransistor

Page 10: CTPS -2017 ACIVITY PHYSICAL COMPUTING · 2019-05-20 · Open the firmware file (S4AFirmware16.ino) from the Arduino environment. e. STEP 5: Select board and port In the Tools menu,

Gas, Motion sensors

• CO2 sensor measures gaseous CO2

levels in an environment. Measures

CO2 levels in the range of 0-5000

ppm.

• Monitors how much infrared

radiation is absorbed by CO2

molecules

• Motion sensors measure displacement, velocity,

acceleration, force, and stress.

• These measurements are used in mechanical

equipment such as servo-systems, robots, and

electrical drive systems.

• Motion sensors include the following types of

devices: potentiometers, resolvers, optical encoders,

variable inductance sensors (displacement),

tachometers (velocity), piezo-resistive sensors (strain).

Page 11: CTPS -2017 ACIVITY PHYSICAL COMPUTING · 2019-05-20 · Open the firmware file (S4AFirmware16.ino) from the Arduino environment. e. STEP 5: Select board and port In the Tools menu,

Sensor

Inputsignal

(measurand)

Arduinosensor data

Network

Display

A s

en

sor

syst

em

Page 12: CTPS -2017 ACIVITY PHYSICAL COMPUTING · 2019-05-20 · Open the firmware file (S4AFirmware16.ino) from the Arduino environment. e. STEP 5: Select board and port In the Tools menu,

SCRATCH WITH ARDUINO BOARD

Page 13: CTPS -2017 ACIVITY PHYSICAL COMPUTING · 2019-05-20 · Open the firmware file (S4AFirmware16.ino) from the Arduino environment. e. STEP 5: Select board and port In the Tools menu,

Arduino

Arduino is an open source computer hardware and

software company, project, and user community that

designs and manufactures single-board

microcontrollers and microcontroller kits for building

digital devices and interactive objects that can sense

and control objects in the physical world.

Page 14: CTPS -2017 ACIVITY PHYSICAL COMPUTING · 2019-05-20 · Open the firmware file (S4AFirmware16.ino) from the Arduino environment. e. STEP 5: Select board and port In the Tools menu,

A typical board layout

Page 15: CTPS -2017 ACIVITY PHYSICAL COMPUTING · 2019-05-20 · Open the firmware file (S4AFirmware16.ino) from the Arduino environment. e. STEP 5: Select board and port In the Tools menu,

Labels : 1 to 5

• The Arduino UNO can be powered

from a USB cable coming from your

computer or a wall power supply

(like this) that is terminated in a

barrel jack.

• The USB connection is labeled (1) and

the barrel jack is labeled (2).

• GND (3): Short for ‘Ground’. There

are several GND pins on the Arduino,

any of which can be used to ground

your circuit.

• 5V (4) & 3.3V (5): the 5V pin supplies

5 volts of power, and the 3.3V pin

supplies 3.3 volts of power.

Page 16: CTPS -2017 ACIVITY PHYSICAL COMPUTING · 2019-05-20 · Open the firmware file (S4AFirmware16.ino) from the Arduino environment. e. STEP 5: Select board and port In the Tools menu,

Labels: 6 to 9

• Analog (6): A0 through A5 are Analog

In pins. These read the signal from

an analog sensor (like a temperature

sensor) and convert it into a digital

value.

• Digital (7): The digital pins 0 through

13 can be used for both digital input

(like telling if a button is pushed)

and digital output (like powering an

LED).

• PWM (8): (~) next to some of the digital

pins (3, 5, 6, 9, 10, and 11. These pins

act as normal digital pins, but can also

be used for something called Pulse-

Width Modulation (PWM). ----these pins

as being able to simulate analog output

(like fading an LED in and out).

• AREF (9): Analog Reference. It is

sometimes used to set an external

reference voltage (between 0 and 5

Volts) as the upper limit for the analog

input pins.

Page 17: CTPS -2017 ACIVITY PHYSICAL COMPUTING · 2019-05-20 · Open the firmware file (S4AFirmware16.ino) from the Arduino environment. e. STEP 5: Select board and port In the Tools menu,

Labels: 10 to 13

• The reset button (10). Pushing it

will temporarily connect the

reset pin to ground and restart

any code that is loaded on the

Arduino.

• Power LED Indicator: A tiny LED

next to the word ‘ON’ (11). This

LED should light up whenever

you plug your Arduino into a

power source.

• TX is short for transmit, RX is short for

receive… indicate the pins responsible for

serial communication. TX and RX appear –

once by digital pins 0 and 1, and a second

time next to the TX and RX indicator LEDs

(12). These LEDs will give us some nice

visual indications whenever our Arduino is

receiving or transmitting data (like when

we’re loading a new program onto the

board).

• Main IC: The black thing with all the

metal legs is an IC, or Integrated Circuit

(13). --- the brains of our Arduino.

Page 18: CTPS -2017 ACIVITY PHYSICAL COMPUTING · 2019-05-20 · Open the firmware file (S4AFirmware16.ino) from the Arduino environment. e. STEP 5: Select board and port In the Tools menu,

Lay out of the Physical computing kit ( Arduino Uno with sensors )

Invert

ed logic

Page 19: CTPS -2017 ACIVITY PHYSICAL COMPUTING · 2019-05-20 · Open the firmware file (S4AFirmware16.ino) from the Arduino environment. e. STEP 5: Select board and port In the Tools menu,

Scratch for Arduino

Scratch for Arduino (S4A) is a Scratch modification

that brings the easiness of programming with Scratch

to the Arduino prototyping board. It provides new

blocks for managing sensors and actuators connected

to Arduino Board.

Page 20: CTPS -2017 ACIVITY PHYSICAL COMPUTING · 2019-05-20 · Open the firmware file (S4AFirmware16.ino) from the Arduino environment. e. STEP 5: Select board and port In the Tools menu,

Th

e S

4A

In

terf

ace

Page 21: CTPS -2017 ACIVITY PHYSICAL COMPUTING · 2019-05-20 · Open the firmware file (S4AFirmware16.ino) from the Arduino environment. e. STEP 5: Select board and port In the Tools menu,

STEP 1 : Download S4A

➢ Download S4A from http://s4a.cat/

Page 22: CTPS -2017 ACIVITY PHYSICAL COMPUTING · 2019-05-20 · Open the firmware file (S4AFirmware16.ino) from the Arduino environment. e. STEP 5: Select board and port In the Tools menu,

STEP 2: Download Arduino Environment

➢ Download and install the Arduino environment by

following the instructions on

http://arduino.cc/en/Main/Software.

Page 23: CTPS -2017 ACIVITY PHYSICAL COMPUTING · 2019-05-20 · Open the firmware file (S4AFirmware16.ino) from the Arduino environment. e. STEP 5: Select board and port In the Tools menu,

STEP 3: Download Firmware

➢ This firmware is a piece of software you need to install

into your Arduino board to be able to communicate with

it from S4A.

➢ Download firmware from

http://vps34736.ovh.net/S4A/S4AFirmware16.ino

Page 24: CTPS -2017 ACIVITY PHYSICAL COMPUTING · 2019-05-20 · Open the firmware file (S4AFirmware16.ino) from the Arduino environment. e. STEP 5: Select board and port In the Tools menu,

STEP 4: Open Firmware

Connect your Arduino board to a USB port in

your computer.

Open the firmware file (S4AFirmware16.ino) from

the Arduino environment.

Page 25: CTPS -2017 ACIVITY PHYSICAL COMPUTING · 2019-05-20 · Open the firmware file (S4AFirmware16.ino) from the Arduino environment. e. STEP 5: Select board and port In the Tools menu,

Op

en

Fir

mw

are

Page 26: CTPS -2017 ACIVITY PHYSICAL COMPUTING · 2019-05-20 · Open the firmware file (S4AFirmware16.ino) from the Arduino environment. e. STEP 5: Select board and port In the Tools menu,

STEP 5: Select board and port

In the Tools menu,

select the board version and the serial port

where the board is connected.

Page 27: CTPS -2017 ACIVITY PHYSICAL COMPUTING · 2019-05-20 · Open the firmware file (S4AFirmware16.ino) from the Arduino environment. e. STEP 5: Select board and port In the Tools menu,

Bo

ard

sele

cti

on

Page 28: CTPS -2017 ACIVITY PHYSICAL COMPUTING · 2019-05-20 · Open the firmware file (S4AFirmware16.ino) from the Arduino environment. e. STEP 5: Select board and port In the Tools menu,

Po

rt s

ele

cti

on

Page 29: CTPS -2017 ACIVITY PHYSICAL COMPUTING · 2019-05-20 · Open the firmware file (S4AFirmware16.ino) from the Arduino environment. e. STEP 5: Select board and port In the Tools menu,

STEP 6: Load firmware

Load the firmware into the Arduino board

through File > Upload.

Page 30: CTPS -2017 ACIVITY PHYSICAL COMPUTING · 2019-05-20 · Open the firmware file (S4AFirmware16.ino) from the Arduino environment. e. STEP 5: Select board and port In the Tools menu,

Lo

ad

Fir

mw

are

Page 31: CTPS -2017 ACIVITY PHYSICAL COMPUTING · 2019-05-20 · Open the firmware file (S4AFirmware16.ino) from the Arduino environment. e. STEP 5: Select board and port In the Tools menu,

Lo

ad

Fir

mw

are

Page 32: CTPS -2017 ACIVITY PHYSICAL COMPUTING · 2019-05-20 · Open the firmware file (S4AFirmware16.ino) from the Arduino environment. e. STEP 5: Select board and port In the Tools menu,

Trouble Shooting : Failure of STEP 6

The issue may be because the appropriate

driver (USB2UART) has not been installed

in your system.

*Go to Device Manager

*Download the USB2UART driver

Page 33: CTPS -2017 ACIVITY PHYSICAL COMPUTING · 2019-05-20 · Open the firmware file (S4AFirmware16.ino) from the Arduino environment. e. STEP 5: Select board and port In the Tools menu,

STEP 7: Communicating with Arduino from S4A

Open S4A

The Arduino board should be detected (2

green LEDs will blink in the USB2UART

component )

Now, program to communicate

Page 34: CTPS -2017 ACIVITY PHYSICAL COMPUTING · 2019-05-20 · Open the firmware file (S4AFirmware16.ino) from the Arduino environment. e. STEP 5: Select board and port In the Tools menu,

Searc

hin

g b

oard

Page 35: CTPS -2017 ACIVITY PHYSICAL COMPUTING · 2019-05-20 · Open the firmware file (S4AFirmware16.ino) from the Arduino environment. e. STEP 5: Select board and port In the Tools menu,

Ard

uin

o f

rom

S4A

Page 36: CTPS -2017 ACIVITY PHYSICAL COMPUTING · 2019-05-20 · Open the firmware file (S4AFirmware16.ino) from the Arduino environment. e. STEP 5: Select board and port In the Tools menu,
Page 37: CTPS -2017 ACIVITY PHYSICAL COMPUTING · 2019-05-20 · Open the firmware file (S4AFirmware16.ino) from the Arduino environment. e. STEP 5: Select board and port In the Tools menu,
Page 38: CTPS -2017 ACIVITY PHYSICAL COMPUTING · 2019-05-20 · Open the firmware file (S4AFirmware16.ino) from the Arduino environment. e. STEP 5: Select board and port In the Tools menu,
Page 39: CTPS -2017 ACIVITY PHYSICAL COMPUTING · 2019-05-20 · Open the firmware file (S4AFirmware16.ino) from the Arduino environment. e. STEP 5: Select board and port In the Tools menu,
Page 40: CTPS -2017 ACIVITY PHYSICAL COMPUTING · 2019-05-20 · Open the firmware file (S4AFirmware16.ino) from the Arduino environment. e. STEP 5: Select board and port In the Tools menu,
Page 41: CTPS -2017 ACIVITY PHYSICAL COMPUTING · 2019-05-20 · Open the firmware file (S4AFirmware16.ino) from the Arduino environment. e. STEP 5: Select board and port In the Tools menu,

EX

#1:

BU

ZZ

ER

Page 42: CTPS -2017 ACIVITY PHYSICAL COMPUTING · 2019-05-20 · Open the firmware file (S4AFirmware16.ino) from the Arduino environment. e. STEP 5: Select board and port In the Tools menu,

EX

#2:

INF

RA

-RE

D

MU

SIC

Page 43: CTPS -2017 ACIVITY PHYSICAL COMPUTING · 2019-05-20 · Open the firmware file (S4AFirmware16.ino) from the Arduino environment. e. STEP 5: Select board and port In the Tools menu,

EX

#3:

LE

D O

N,

OF

F

WIT

H M

US

IC

Page 44: CTPS -2017 ACIVITY PHYSICAL COMPUTING · 2019-05-20 · Open the firmware file (S4AFirmware16.ino) from the Arduino environment. e. STEP 5: Select board and port In the Tools menu,

EX

#4:

SO

UN

D

Page 45: CTPS -2017 ACIVITY PHYSICAL COMPUTING · 2019-05-20 · Open the firmware file (S4AFirmware16.ino) from the Arduino environment. e. STEP 5: Select board and port In the Tools menu,

EX

#5:

PU

SH

BU

TT

ON

Page 46: CTPS -2017 ACIVITY PHYSICAL COMPUTING · 2019-05-20 · Open the firmware file (S4AFirmware16.ino) from the Arduino environment. e. STEP 5: Select board and port In the Tools menu,

EX

#5:

PU

SH

BU

TT

ON

Page 47: CTPS -2017 ACIVITY PHYSICAL COMPUTING · 2019-05-20 · Open the firmware file (S4AFirmware16.ino) from the Arduino environment. e. STEP 5: Select board and port In the Tools menu,

EX

#6:

LE

D F

AD

E A

ND

B

RIG

HT

Page 48: CTPS -2017 ACIVITY PHYSICAL COMPUTING · 2019-05-20 · Open the firmware file (S4AFirmware16.ino) from the Arduino environment. e. STEP 5: Select board and port In the Tools menu,

EX

#7:

LIG

HT

Page 49: CTPS -2017 ACIVITY PHYSICAL COMPUTING · 2019-05-20 · Open the firmware file (S4AFirmware16.ino) from the Arduino environment. e. STEP 5: Select board and port In the Tools menu,

EX

#8:

CO

LO

R C

OD

E

Page 50: CTPS -2017 ACIVITY PHYSICAL COMPUTING · 2019-05-20 · Open the firmware file (S4AFirmware16.ino) from the Arduino environment. e. STEP 5: Select board and port In the Tools menu,

EX

#9:

PO

TE

NT

IOM

ET

ER

Page 51: CTPS -2017 ACIVITY PHYSICAL COMPUTING · 2019-05-20 · Open the firmware file (S4AFirmware16.ino) from the Arduino environment. e. STEP 5: Select board and port In the Tools menu,

EX

#9:

PO

TE

NT

IOM

ET

ER

Page 52: CTPS -2017 ACIVITY PHYSICAL COMPUTING · 2019-05-20 · Open the firmware file (S4AFirmware16.ino) from the Arduino environment. e. STEP 5: Select board and port In the Tools menu,

EX

#10

: P

AP

ER

CH

EC

K