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

senza_titolo

introduction

a real programming for a real traffic lights.

program

Arduino apri il programma


Arduino inizia il laboratorio

algorithm


attrezzaggio

pin1 ledverde Arduino _green1
pin2 ledverde Arduino _green2
pin3˜ ledgiallo Arduino _yellow1
pin4 ledgiallo Arduino _yellow2
pin5˜ ledrosso Arduino _red1
pin6˜ ledrosso Arduino _red2

variabili


ciclo

annotation: first traffic lights
SWITCH ON (5 Volt) switch on _green1 component
SWITCH OFF   (0 Volt) switch off _yellow1 component
SWITCH OFF   (0 Volt) switch off _red1 component
annotation: second traffic lights
SWITCH OFF   (0 Volt) switch off _green2 component
SWITCH OFF   (0 Volt) switch off _yellow2 component
SWITCH ON (5 Volt) switch on _red2 component
wait 5000 milliseconds
annotation: yellow on the first
SWITCH ON (5 Volt) switch on _yellow1 component
wait 1000 milliseconds
annotation: now red on the first, green on the second
SWITCH OFF   (0 Volt) switch off _green1 component
SWITCH OFF   (0 Volt) switch off _yellow1 component
SWITCH ON (5 Volt) switch on _red1 component
SWITCH ON (5 Volt) switch on _green2 component
SWITCH OFF   (0 Volt) switch off _yellow2 component
SWITCH OFF   (0 Volt) switch off _red2 component
annotation: 10 seconds because this is main road
wait 10000 milliseconds
annotation: yellow to the second
SWITCH ON (5 Volt) switch on _yellow2 component
wait 1000 milliseconds

Arduino code

Arduino

copy/past in Arduino

collegamenti elettrici

Arduino
Fritzing qui il file Fritzing


indietro torna all'indice avanti esci logout Licenza Creative Commons

Ultima modifica: Agosto 2016