pages
home
compiler
code compiler
electronics
notes about electronics
laboratory
laboratory
Processing
Processing code compiler
Theremino
Theremino code compiler
logggin
accedi o esci
tutorials Arduino
lights
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
Italian
handbook
pins
connections
resistors
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
begins the workshop
review a workshop carried out
my account
info
link
contacts
senza_titolo
introduction
Already having learned only two functions, switch on/off and wait, there are infinite games of light to do. Here some exercises. The student can create more!
LED flashing
LED flashing quickly
LED flashing slowly
following lights
lights bouncing
LED launching the SOS in Morse code (... ___ ...)
wikipedia ... Strobe_light
program
apri il programma
inizia il laboratorio
algorithm
attrezzaggio
pin10˜
_led3
pin11˜
_led2
pin13
_led1
variabili
ciclo
annotation: following lights
SWITCH ON (5 Volt)
_led1
wait
100
milliseconds
SWITCH OFF (0 Volt)
_led1
SWITCH ON (5 Volt)
_led2
wait
100
milliseconds
SWITCH OFF (0 Volt)
_led2
SWITCH ON (5 Volt)
_led3
wait
100
milliseconds
SWITCH OFF (0 Volt)
_led3
annotation: ...
Arduino code
//programma: senza_titolo //******* pin ******** //******* declare ******** const int pin_led3=10;//pin of _led3 const int pin_led2=11;//pin of _led2 const int pin_led1=13;//pin of _led1 //********** setup ********** void setup(){ pinMode(pin_led3,OUTPUT); pinMode(pin_led2,OUTPUT); pinMode(pin_led1,OUTPUT); } //********** loop ********** void loop() { // following_lights digitalWrite(pin_led1,HIGH); // HIGH/LOW is the voltage 5V/0V) delay(100);//attendi digitalWrite(pin_led1,LOW); // HIGH/LOW is the voltage 5V/0V) digitalWrite(pin_led2,HIGH); // HIGH/LOW is the voltage 5V/0V) delay(100);//attendi digitalWrite(pin_led2,LOW); // HIGH/LOW is the voltage 5V/0V) digitalWrite(pin_led3,HIGH); // HIGH/LOW is the voltage 5V/0V) delay(100);//attendi digitalWrite(pin_led3,LOW); // HIGH/LOW is the voltage 5V/0V) // ... };//end loop //powered by "Arduinomio" (C) //www.mastrohora.it
copy/past in Arduino
electrical connections
here Fritzing's file
logout
Ultima modifica: Agosto 2016