Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: draw.h
- Revision:
- 6:edb27e228558
- Parent:
- 5:10349dda4f42
- Child:
- 7:315630fad89f
--- a/draw.h Fri Nov 25 14:55:07 2016 +0000
+++ b/draw.h Fri Oct 12 09:16:23 2018 +0000
@@ -1,56 +1,46 @@
-// lieu de vos variables ( les faire commencer par un a
-int atiti = 0;
+// lieu de vos variables avec 'a' au début
+int atiti = 5; // exemple
-// lieu de vos fonctions ..qui seront appelées plus bas dans votre draw
+// lieu de vos fonctions ..appelées plus bas
+// leur Nom commencera par "a" aussi !!
+ void atest(void)
+ {
+ atiti = 15 ; // pour le plaisir
+ }
-
-void draw() // boucle répétée chauqe 30 ms
+void draw() // exemple d'une chose a faire ( pas de delai dans cette boucle)
{
- /* ar = 5 ; av = 0 ; ab = 0;
- accx = abs(accx);
- circle ( 15 , 15 , accx );
- ar = 0 ; av = 5 ; ab = 0;
- accy = abs(accy);
- circle ( 15 , 15 , accy );
-
+
+ // circle(10,15,13);
+ // charr(20,20,'x');
+ }
- atr = 0 ; atv = 10 ; atb = 0;
- chart(6,13,'G');
- atr = 0 ; atv = 0 ; atb = 15;
- chart(11,13,'E');
- atr = 9 ; atv = 0 ; atb = 0;
- chart(16,13,'I');
- atr = 7; atv = 7 ; atb = 7;
- chart(21,13,'I');
- atr = 8 ; atv = 0 ; atb = 5;
- chart(10,1,'D');
- atr = 7; atv = 7 ; atb = 0;
- chart(15,1,'U');
- atr = 0 ; atv = 9 ; atb = 3;
- chart(20,1,'T');
- atr = 14 ; atv = 14; atb = 14;
- chart(2,24,'C');
- chart(8,24,'E');
- chart(14,24,'R');
- chart(20,24,'G');
- chart(26,24,'Y'); */
- pix(15,15,5,2,4);
- }
+/* futur gestion hasard
+ ZX = rand()%64 ; ZY = rand()%32 ; ZR = rand()%16 ;
+ coul(ZR);
+ pix ( ZX,ZY,ZR,ZV,ZB); // on alume un pixel
+ ZX = rand()%64 ; ZY = rand()%32 ;
+ pix ( ZX,ZY,0,0,0); // on en éteint un autre
+*/
+
+
+
+ // fonctions et variables utiles
- // fonctions pré existantes ( utilisant des entiers )
// pix ( x , y , r , v , b ) dessine un pixel de couleur en xy
- // x et y position du pixel à dessiner ( 0 à 31 )
- // r v b quantité de 0 à 7 du r v b .. 7 c'est lumineux
- // ptnum2(x, y , nombre ) écrit un nombre a la position x y matrice
- // nombre ou variable .. un entier compris entre 0 et 99
- // ptint ( y , nombre ) ecrit entier ( 5 chiffres ) x = 1
- // circle(int px , int py , int r )
- // px et py position xy du cercle de rayon r , avec ar av ab
- // charr ( x y 'char')ecrire car rouge sur fond noir ( x 0 1 2 3 4 5 6 7 8 9 )
- // chart ( x y 'char')ecrire car couleur atr atb atv sur fond existant ( GEI)
- //
+ // x et y position du pixel à dessiner ( 0 à 31 )
+ // r v b quantité de r v b codée de 0 à 7 , 7 c'est lumineux
+
+ // ptnum(x, y , nombre ) écrit un nombre en rouge en x y
+ // x et y position ou ecrire ( 0 a 31)
+ // nombre ou variable .. un entier compris entre 0 et 99
- // Variables pré existantes utilisables
- // accx accy int de -15 à +15 copie de l'acceleration xy
- // ar av ab int porteur des couleurs à utiliser ( 0 à 7) en cercle
- // atr atv atb int porteur des couleurs à utiliser ( 0 à 7)en texte
\ No newline at end of file
+ // circle( x , y , r ) dessine un cercle de centre xy rayon r
+ // x et y position du centre ( 0 à 31)
+ // r rayon du cercle
+ // la couleur est prédéfinie ( 0 à 7) dans br bv bb
+
+ // charr( x , y , "char') ecrit carractère en x y
+
+
+