pages
home
compiler logo
code compiler
electronics
notes about electronics
laboratory
laboratory
Processing logo
Processing code compiler
Theremino logo
Theremino code compiler
logggin Arduino
accedi o esci

tutorials Arduino

lights Arduino

my first led turns on

led's games

an electronic dice

traffic lights

candle effect

fading effect

red-green-blue 1

red-green-blue 2

7-segment display - Countdown

7-segment display bis

sensors

sensors

Sensor and serial port

sensor PIR

ultrasonic sensor

sound

Theremin

a melody

build a note

switches

buttons

keypad

input via serial port

input via serial port 2

input remote control

input remote control 2

use of variables

custom functions

servos

a robot

a remote-controlled robot

elettronica

mechanics

inglese Italian

handbook

pins

connections

resistors

Scarica Adobe Flash Player

remarkable sketches

remarkable circuits

Arduino pins

error messages

tables

colour's tables

electrical simbols

referenze on-line

reference Arduino

reference Processing

link

www.arduino.cc

fritzing.org/projects

processing.org

links

hardware

base kit

facilitated kits

advanced kits

Theremino

Arduino begins the workshop

review a workshop carried out

my account

info

link

contacts

pulsante

introduction

When you press a button down, it may not make contact to both sides at the exact same moment – in fact, it may make contact on one side – then both – and then the other side – until it finally settles down. This making and breaking contact is called bouncing.

program

Arduino apri il programma


Arduino inizia il laboratorio

algorithm


attrezzaggio

pin11˜ pulsante Arduino _button
pin13 ledgiallo Arduino _led13

variabili

state = 0
previous_state = 255

ciclo

the variable state is equal at the state of the switch: _button
IF HAPPENS THAT state is equal to HIGH and even IF state is not equal to previous_state
SWITCH ON (5 Volt) switch on _led13 component
IF HAPPENS THAT state is equal to LOW and even IF state is not equal to previous_state
SWITCH OFF   (0 Volt) switch off _led13 component
the variable statoprecedente is equal to state
wait 100 milliseconds

Arduino code

Arduino

copy/past in Arduino

electrical connections

Arduino
Fritzing here Fritzing's file


indietro torna all'indice avanti esci logout Licenza Creative Commons

Ultima modifica: Agosto 2016