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
last row 14
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
engaged pins: 3
declare variables
riga:4
=
integer
floating-point
text
array
main
row:5
the variable
...
X
is equal to... read the sensor:
...
_sensor_PIR
row:6
write on the serial:
...
X
new line
row:7
IF HAPPENS THAT
...
X
is greater than
is less than
is equal to
is not equal to
an even if/or if...
row:8
SWITCH ON (5 Volt)
the
_red_led
row:9
PLAY the note
pause
B
0 C
0 C#
0 D
0 Eb
0 E
0 F
0 F#
0 G
0 G#
0 A
0 Bb
0 B
1 C
1 C#
1 D
1 Eb
1 E
1 F
1 F#
1 G
1 G#
1 A
1 Bb
1 B
2 C
2 C#
2 D
2 Eb
2 E
2 F
2 F#
2 G
2 G#
2 A
2 Bb
2 B
C central
3 C#
3 D
3 Eb
3 E
3 F
3 F#
3 G
3 G#
3 A
3 Bb
3 B
4 C
4 C#
4 D
4 Eb
4 E
4 F
4 F#
4 G
4 G#
4 A
4 Bb
4 B
5 C
5 C#
5 D
5 Eb
5 E
5 F
5 F#
5 G
5 G#
5 A
5 Bb
5 B
6 C
6 C#
6 D
6 Eb
6 E
6 F
6 F#
6 G
6 G#
6 A
6 Bb
6 B
7 C
7 C#
7 D
7 Eb
pause
of frequenze
(262 Hz) duration of:
milliseconds
row:10
WAIT
milliseconds
row:11
SWITCH OFF (0 Volt)
the
_red_led
row:12
PLAY the note
pause
B
0 C
0 C#
0 D
0 Eb
0 E
0 F
0 F#
0 G
0 G#
0 A
0 Bb
0 B
1 C
1 C#
1 D
1 Eb
1 E
1 F
1 F#
1 G
1 G#
1 A
1 Bb
1 B
2 C
2 C#
2 D
2 Eb
2 E
2 F
2 F#
2 G
2 G#
2 A
2 Bb
2 B
C central
3 C#
3 D
3 Eb
3 E
3 F
3 F#
3 G
3 G#
3 A
3 Bb
3 B
4 C
4 C#
4 D
4 Eb
4 E
4 F
4 F#
4 G
4 G#
4 A
4 Bb
4 B
5 C
5 C#
5 D
5 Eb
5 E
5 F
5 F#
5 G
5 G#
5 A
5 Bb
5 B
6 C
6 C#
6 D
6 Eb
6 E
6 F
6 F#
6 G
6 G#
6 A
6 Bb
6 B
7 C
7 C#
7 D
7 Eb
pause
of frequenze
(392 Hz) duration of:
milliseconds
row:13
WAIT
milliseconds
row:14
(close the cycle)
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
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: sensor_PIR //******* pin ******** //******* declare ******** const int pin_red_led=13;//pin of _red_led const int pin_altoparlante=0;//the longer leg is the positive and goes to pin, the other to GND const int pin_sensor_PIR=A0;//pin sensorgenericosensore int X=0;//declares the variable //********** setup ********** void setup(){ pinMode(pin_red_led,OUTPUT); pinMode(pin_altoparlante,OUTPUT); pinMode(pin_sensor_PIR,INPUT); Serial.begin(9600); // Initialize the serial } //********** loop ********** void loop() { X=analogRead(pin_sensor_PIR); // reads the sensor _sensor_PIR Serial.print("valore di...");//writes on the serial Serial.println(X);//writes on the serial if(X>100){ digitalWrite(pin_red_led,HIGH); // HIGH/LOW is the voltage 5V/0V) tone(pin_altoparlante,262,500); delay(1000);//attendi digitalWrite(pin_red_led,LOW); // HIGH/LOW is the voltage 5V/0V) tone(pin_altoparlante,392,500); delay(1000);//attendi } };//end loop //powered by "Arduinomio" (C) //www.mastrohora.it
copy/past in Arduino
logout