Permalink
Browse files

add example1 of LED blinking

This example use the internal LED of arduino wired to 13 pin.

Signed-off-by: Zakaria ElQotbi <zakaria@derbsellicon.com>
  • Loading branch information...
Ayoub ElQotbi Zakaria ElQotbi
Ayoub ElQotbi authored and Zakaria ElQotbi committed Nov 16, 2013
1 parent 88b95f3 commit ca217cbac116b7edf701374538b7349955786851
Showing with 49 additions and 0 deletions.
  1. +49 −0 ex1-clignotement/ex1-clignotement.pde
@@ -0,0 +1,49 @@
/*
* =============================================================================
*
* Filename: clignotement.c
*
* Description: MA: Program sahl ti ch3l o itfi la LED dial la carte arduino
* FR: un simple programme qui fait clignote une LED sur la
* carte Arduino.
* EN: A simple program to blink a LED in arduino board.
*
* Version: 1.0
* Created: 11/16/2013 04:29:11 PM
* Revision: none
* Compiler: gcc-avr
*
* Author: Ayoub ElQotbi (DiDii), ayoub@derbsellicon.com
* Company: Derbsellicon
* URL: https://github.com/derbsellicon/arduino-intro
*
* =============================================================================
*/
/*
* setup() la Fonction d'initialisation li tat executa mra wa7da fdemarage dial
* lprogram dialna.
* o fiha fin tan3lmo arduino chnahoma les entrees, o chnahoma les sorties.
*
*/
void setup()
{
/*
* fhad l'exemple: hadi ndeclariw la Pin 13 anaha 'sortie': 7it tankhrjo
* menha information.
*/
pinMode(13,OUTPUT);
}
/*
* loop() la Fonction coeur dial lprogram dialna, li hia 3ibara 3la une boucle
* sans fin ma3merha matatsali 7ta tantfiw la carte arduino.
* hna fin tan7to l'algorithm dial lprogram.
*/
void loop()
{
digitalWrite(13,HIGH); /* tansifto fla led signal HIGH bach ncha3lo la led */
delay(200); /* ntsnaw 200ms, bach tb9a led mch3ola fhad lmoda */
digitalWrite(13,LOW); /* tansifto fla led signal LOW bach ntfiw la led */
delay(500); /* ntsnaw 500ms bach tb9a led mch3ola fhad lmoda */
}

0 comments on commit ca217cb

Please sign in to comment.