pages
home
compiler
code compiler
processing
Processing code compiler
electronics
notes about electronics
laboratory
laboratory
logggin
login/logout
File
new code
open code
save code
export code
participates in the laboratory (as student)
begin a laboratory (as teacher)
login
Edit
undo
redo
select all
invert selection
deselect
select setup
select loop
After the
row #1
row #2
row #3
row #4
row #5
row #6
row #7
row #8
row #9
row #10
row #11
row #12
row #13
row #14
row #15
row #16
row #17
row #18
row #19
row #20
row #21
row #22
row #23
row #24
row #25
row #26
row #27
row #28
row #29
last row 30
move
selected rows.
copy
selected rows.
past
from the clipboard.
Copy in the clipboard
selected rows,
for another code.
delete
selected rows.
Tooling
Add variable
tooling default
"Arduino Esplora"
"Arduino Robot"
Danger Shield - Sparkfun
CodeShield
LED
Add a green led
Add a yellow led
Add a red led
Add a blue led
Add a RGB led
Add bicolor led
Add LED matrix
Add a 7 segments led
actuators
Add a speaker
Add an ultrasonic sensor
Add a motor
Add a servo
Add a relay
Add a IR emitter
Add a display lcd
sensors
Add a button
Add a switch
Add a potentiometer
Add an encoder
Add a photoresistor
Add a temperature sensor
Add a humidity sensor
Add a microphone
Add an ultrasonic sensor
Add a remote control IR
Add a IR receiver
Add a generic actuator
Add a generic sensor
Actions
wait for a time
switch off / switch on
modulate the voltage
drive servo motor
play a note
read from a sensor
detects the status of a button
reads the duration of an impulse
transform a variable
if that happens do this
repeat n times
new function
call a function
Add a note
Add a marker
generate a random number
milliseconds
read from the serial port
write on the serial port
write on a display LCD
View
italian
english
style
clear
style
space
style
classic
larger character
smaller character
pages
electricity
guide
contacts
tooling
row:0
pin0
pin1
pin2
pin3˜
pin4
pin5˜
pin6˜
pin7
pin8
pin9˜
pin10˜
pin11˜
pin12
pin13
pinA0
pinA1
pinA2
pinA3
pinA4
pinA5
row:1
pin0
pin1
pin2
pin3˜
pin4
pin5˜
pin6˜
pin7
pin8
pin9˜
pin10˜
pin11˜
pin12
pin13
pinA0
pinA1
pinA2
pinA3
pinA4
pinA5
row:2
pin0
pin1
pin2
pin3˜
pin4
pin5˜
pin6˜
pin7
pin8
pin9˜
pin10˜
pin11˜
pin12
pin13
pinA0
pinA1
pinA2
pinA3
pinA4
pinA5
row:3
pin0
pin1
pin2
pin3˜
pin4
pin5˜
pin6˜
pin7
pin8
pin9˜
pin10˜
pin11˜
pin12
pin13
pinA0
pinA1
pinA2
pinA3
pinA4
pinA5
row:4
pin0
pin1
pin2
pin3˜
pin4
pin5˜
pin6˜
pin7
pin8
pin9˜
pin10˜
pin11˜
pin12
pin13
pinA0
pinA1
pinA2
pinA3
pinA4
pinA5
row:5
pin0
pin1
pin2
pin3˜
pin4
pin5˜
pin6˜
pin7
pin8
pin9˜
pin10˜
pin11˜
pin12
pin13
pinA0
pinA1
pinA2
pinA3
pinA4
pinA5
engaged pins: 6
declare variables
main
row:7
annotation:
row:8
SWITCH ON (5 Volt)
the
_green1
_green2
_yellow1
_yellow2
_red1
_red2
row:9
SWITCH OFF (0 Volt)
the
_green1
_green2
_yellow1
_yellow2
_red1
_red2
row:10
SWITCH OFF (0 Volt)
the
_green1
_green2
_yellow1
_yellow2
_red1
_red2
row:11
annotation:
row:12
SWITCH OFF (0 Volt)
the
_green1
_green2
_yellow1
_yellow2
_red1
_red2
row:13
SWITCH OFF (0 Volt)
the
_green1
_green2
_yellow1
_yellow2
_red1
_red2
row:14
SWITCH ON (5 Volt)
the
_green1
_green2
_yellow1
_yellow2
_red1
_red2
row:15
WAIT
milliseconds
row:16
annotation:
row:17
SWITCH ON (5 Volt)
the
_green1
_green2
_yellow1
_yellow2
_red1
_red2
row:18
WAIT
milliseconds
row:19
annotation:
row:20
SWITCH OFF (0 Volt)
the
_green1
_green2
_yellow1
_yellow2
_red1
_red2
row:21
SWITCH OFF (0 Volt)
the
_green1
_green2
_yellow1
_yellow2
_red1
_red2
row:22
SWITCH ON (5 Volt)
the
_green1
_green2
_yellow1
_yellow2
_red1
_red2
row:23
SWITCH ON (5 Volt)
the
_green1
_green2
_yellow1
_yellow2
_red1
_red2
row:24
SWITCH OFF (0 Volt)
the
_green1
_green2
_yellow1
_yellow2
_red1
_red2
row:25
SWITCH OFF (0 Volt)
the
_green1
_green2
_yellow1
_yellow2
_red1
_red2
row:26
annotation:
row:27
WAIT
milliseconds
row:28
annotation:
row:29
SWITCH ON (5 Volt)
the
_green1
_green2
_yellow1
_yellow2
_red1
_red2
row:30
WAIT
milliseconds
actions
new function
call a function
messaggi
...
file
di
clear
space
classic
select all
invert selection
deselect
select setup
select loop
After the
1th row
2th row
3th row
4th row
5th row
6th row
7th row
8th row
9th row
10th row
11th row
12th row
13th row
14th row
15th row
16th row
17th row
18th row
19th row
20th row
21th row
22th row
23th row
24th row
25th row
26th row
27th row
28th row
29th row
last row
move
the selected rows.
copy
the selected rows.
past
from the clipboard.
copy in the clipboard
the selected rows.
erase
the selected rows.
components
actions
wait
switch off / switch on
modulate the voltage
drive servo motor
play a note
read from a sensor
detects the status of a button
reads the duration of an impulse
transform a variable
if that happens do this
repeat n times
new function
call a function
Add a note
Add a marker
generate a random number
milliseconds
reads from the serial port
write on the serial port
write on a display LCD
//programma: traffic_lights //******* pin ******** //******* declare ******** const int pin_green1=1;//pin of _green1 const int pin_green2=2;//pin of _green2 const int pin_yellow1=3;//pin of _yellow1 const int pin_yellow2=4;//pin of _yellow2 const int pin_red1=5;//pin of _red1 const int pin_red2=6;//pin of _red2 //********** setup ********** void setup(){ pinMode(pin_green1,OUTPUT); pinMode(pin_green2,OUTPUT); pinMode(pin_yellow1,OUTPUT); pinMode(pin_yellow2,OUTPUT); pinMode(pin_red1,OUTPUT); pinMode(pin_red2,OUTPUT); } //********** loop ********** void loop() { // first_traffic_lights digitalWrite(pin_green1,HIGH); // HIGH/LOW is the voltage 5V/0V) digitalWrite(pin_yellow1,LOW); // HIGH/LOW is the voltage 5V/0V) digitalWrite(pin_red1,LOW); // HIGH/LOW is the voltage 5V/0V) // second_traffic_lights digitalWrite(pin_green2,LOW); // HIGH/LOW is the voltage 5V/0V) digitalWrite(pin_yellow2,LOW); // HIGH/LOW is the voltage 5V/0V) digitalWrite(pin_red2,HIGH); // HIGH/LOW is the voltage 5V/0V) delay(5000);//attendi // yellow_on_the_first digitalWrite(pin_yellow1,HIGH); // HIGH/LOW is the voltage 5V/0V) delay(1000);//attendi // now_red_on_the_first,_green_on_the_second digitalWrite(pin_green1,LOW); // HIGH/LOW is the voltage 5V/0V) digitalWrite(pin_yellow1,LOW); // HIGH/LOW is the voltage 5V/0V) digitalWrite(pin_red1,HIGH); // HIGH/LOW is the voltage 5V/0V) digitalWrite(pin_green2,HIGH); // HIGH/LOW is the voltage 5V/0V) digitalWrite(pin_yellow2,LOW); // HIGH/LOW is the voltage 5V/0V) digitalWrite(pin_red2,LOW); // HIGH/LOW is the voltage 5V/0V) // 10_seconds_because_this_is_main_road delay(10000);//attendi // yellow_to_the_second digitalWrite(pin_yellow2,HIGH); // HIGH/LOW is the voltage 5V/0V) delay(1000);//attendi };//end loop //powered by "Arduinomio" (C) //www.mastrohora.it
copy/past in Arduino
logout