This is the 'hello, world' of electronic !!
// Blinking a led with Pinguino
// jean-pierre MANDON 2008
#define led 0
#define tempo 250
void setup()
{
pinMode(led,OUTPUT);
}
void loop()
{
while (1) {
digitalWrite(led,HIGH);
delay(tempo);
digitalWrite(led,LOW);
delay(tempo);
}
}
The led is connected on the output 0 ( RB0 ).
Ouahhhhhhhhh, it works !!
Friday, September 5, 2008
Blink a led with Pinguino
Libellés :
pinguino software
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment