Modifications

Sauter à la navigation Sauter à la recherche
Ligne 35 : Ligne 35 :  
  <nowiki>/*
 
  <nowiki>/*
 
  * bright.c:
 
  * bright.c:
  *     Vary the Q2W LED brightness with the analog card
+
  *   Faire varier la luminosité de la LED sur la carte Q2W principale
 +
*    avec la carte analogique
 
  *
 
  *
 
  * Copyright (c) 2012-2013 Gordon Henderson. <projects@drogon.net>
 
  * Copyright (c) 2012-2013 Gordon Henderson. <projects@drogon.net>
Ligne 57 : Ligne 58 :  
   int value ;
 
   int value ;
   −
// Enable the on-goard GPIO
+
// Activation du GPIO
    
   wiringPiSetup () ;
 
   wiringPiSetup () ;
   −
// Add in the pcf8591 on the q2w board
+
// Ajouter le pcf8591 de la carte analogique q2w
    
   pcf8591Setup (Q2W_ABASE, 0x48) ;
 
   pcf8591Setup (Q2W_ABASE, 0x48) ;
   −
   printf ("Raspberry Pi - Quick2Wire Analog Test\n") ;
+
   printf ("Raspberry Pi - Quick2Wire Test Analogique\n") ;
   −
// Setup the LED
+
// Initialiser la LED (en mode PWM)
    
   pinMode  (LED, PWM_OUTPUT) ;
 
   pinMode  (LED, PWM_OUTPUT) ;
Ligne 82 : Ligne 83 :  
}</nowiki>
 
}</nowiki>
   −
This program is called bright.c and you can find it in the q2w directory under the wiringPi examples directory. You can compile and run with:
+
Ce programme s'appelle bright.c et vous pouvez le trouver dans le sous répertoire ''q2w/examples/'' (les exemples Quick2Wire) du répertoire wiringPi.  
 +
 
 +
Vous pouvez le compiler et l'exécuter avec les commandes suivantes:
    
  <nowiki>gcc -Wall -o bright bright.c -lwiringPi
 
  <nowiki>gcc -Wall -o bright bright.c -lwiringPi
29 918

modifications

Menu de navigation