Você está na página 1de 2

1 Introduction

2 First programs
Sketch 1: A ashing LED on a protoboard
1 int x ;
/
3
S k e t c h un l e d i n t e r m i t e n t e en una t a r j e t a de p r u e b a s .
Es p r a c t i c a m e n t e l o mismo que un H e l l o World .
5 En e s t e c a s o cambiamos e l p i n d e l LED y usamos un LED e x t e r n o ,
LED hay que c o l o c a r un r e s i s t o r e n t r e e l LED y t i e r r a .
/
7
void setup ( ) {
9
// i n i c i a l i z a e l p i n d i g i t a l 9 como s a l i d a ( o u t p u t )
pinMode ( 9 ,
);
11 }

OUTPUT

13 v o i d l o o p ( ) {
digitalWrite (9 ,
) ; // pone
15
d e l a y ( 100 0 ) ; // e s p e r a p o r un
digitalWrite (9 ,
) ; // pone
17
d e l a y ( 100 0 ) ; // e s p e r a p o r un
}

HIGH
LOW

e l LED en HIGH ( e n c e n d i d o )
segundo , 1 0 0 0 ms
e l LED en LOW ( apagado )
segundo , 1 0 0 0 ms

ademas

del

Você também pode gostar