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
row #30
row #31
row #32
row #33
row #34
row #35
row #36
row #37
last row 38
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: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
row:6
pin0
pin1
pin2
pin3˜
pin4
pin5˜
pin6˜
pin7
pin8
pin9˜
pin10˜
pin11˜
pin12
pin13
pinA0
pinA1
pinA2
pinA3
pinA4
pinA5
row:7
pin0
pin1
pin2
pin3˜
pin4
pin5˜
pin6˜
pin7
pin8
pin9˜
pin10˜
pin11˜
pin12
pin13
pinA0
pinA1
pinA2
pinA3
pinA4
pinA5
engaged pins: 5
declare variables
riga:1
=
integer
floating-point
text
array
riga:2
=
integer
floating-point
text
array
main
row:8
annotation:
row:9
SWITCH ON (5 Volt)
the
_left_eye
_right_eye
row:10
SWITCH ON (5 Volt)
the
_left_eye
_right_eye
row:11
annotation:
row:13
ROTATE
_head
_left_arm
_right_arm
angle of degrees:
row:14
annotation:
row:15
ROTATE
_head
_left_arm
_right_arm
angle of degrees:
row:16
annotation:
row:17
ROTATE
_head
_left_arm
_right_arm
angle of degrees:
row:18
WAIT
milliseconds
row:19
row:20
annotation:
row:21
REPEAT
times:
(usa contatore i)
row:22
annotation:
row:23
ROTATE
_head
_left_arm
_right_arm
angle of degrees:
row:24
WAIT
milliseconds
row:25
annotation:
row:26
ROTATE
_head
_left_arm
_right_arm
angle of degrees:
row:27
WAIT
milliseconds
row:28
(close the cycle)
row:29
row:30
annotation:
row:31
REPEAT
times:
(usa contatore i2)
row:32
SWITCH OFF (0 Volt)
the
_left_eye
_right_eye
row:33
SWITCH OFF (0 Volt)
the
_left_eye
_right_eye
row:34
WAIT
milliseconds
row:35
SWITCH ON (5 Volt)
the
_left_eye
_right_eye
row:36
SWITCH ON (5 Volt)
the
_left_eye
_right_eye
row:37
WAIT
milliseconds
row:38
(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
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
30th row
31th row
32th row
33th row
34th row
35th row
36th row
37th 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: robot //******* pin ******** //******* declare ******** #include
; //library to work with servo motorsint A=0;//declares the variable int B=0;//declares the variable Servo _head; //declare 'mioservo' to control the servo motor const int pin_head=13;//pin of the servo _head Servo _left_arm; //declare 'mioservo' to control the servo motor const int pin_left_arm=3;//pin of the servo _left_arm Servo _right_arm; //declare 'mioservo' to control the servo motor const int pin_right_arm=5;//pin of the servo _right_arm const int pin_left_eye=10;//pin of _left_eye const int pin_right_eye=11;//pin of _right_eye //********** setup ********** void setup(){ _head.attach(pin_head); // connect the servo to the pin _left_arm.attach(pin_left_arm); // connect the servo to the pin _right_arm.attach(pin_right_arm); // connect the servo to the pin pinMode(pin_left_eye,OUTPUT); pinMode(pin_right_eye,OUTPUT); } //********** loop ********** void loop() { // eyes_on digitalWrite(pin_left_eye,HIGH); // HIGH/LOW is the voltage 5V/0V) digitalWrite(pin_right_eye,HIGH); // HIGH/LOW is the voltage 5V/0V) // see_on_the_right _head.write(170);// servo position 170° // on_the_left _head.write(10);// servo position 10° // in_front_of_you _head.write(90);// servo position 90° delay(2000);//attendi //******************************** // hye //repeat 3 times for(int i=1;i<=3;i++){ // up_the_arm _right_arm.write(170);// servo position 170° delay(100);//attendi // down _right_arm.write(150);// servo position 150° delay(100);//attendi } //******************************** // lampeggia gli occhi //repeat 7 times for(int i2=1;i2<=7;i2++){ digitalWrite(pin_left_eye,LOW); // HIGH/LOW is the voltage 5V/0V) digitalWrite(pin_right_eye,LOW); // HIGH/LOW is the voltage 5V/0V) delay(300);//attendi digitalWrite(pin_left_eye,HIGH); // HIGH/LOW is the voltage 5V/0V) digitalWrite(pin_right_eye,HIGH); // HIGH/LOW is the voltage 5V/0V) delay(300);//attendi } };//end loop //powered by "Arduinomio" (C) //www.mastrohora.it
copy/past in Arduino
logout