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: main.cpp
- Revision:
- 1:95a7e179a181
- Parent:
- 0:3cb0bc1eb7fa
- Child:
- 2:1af4d847d589
diff -r 3cb0bc1eb7fa -r 95a7e179a181 main.cpp
--- a/main.cpp Mon May 09 12:49:08 2016 +0000
+++ b/main.cpp Tue May 10 11:50:12 2016 +0000
@@ -1,10 +1,8 @@
-// 401version Ci image 0x 0y en haut à gauche
-// led en 16 lignes ( repère fleché 0 0 )
-// image defilante .. version direct bmp classée en c et p
-// rx en 200K bauds
-// multi usages
+// duj401 pour TR de s2
+// sans serie wdt ou autre
+// lieu de programmation >>> dans le draw !!
+
#include "mbed.h"
-//#include "stm32f4xx_hal_iwdg.h"
#define LOW 0
#define HIGH 1
#define R 0
@@ -17,8 +15,6 @@
DigitalOut CLK(PC_2); // Data clock - rising edge
DigitalOut LAT(PC_0); // Data latch - active low (pulse up after data load)
DigitalOut OE(PC_3); // Output enable - active low (hold high during data load, bring low after LAT pulse)
-//DigitalIn X0(PB_13);DigitalIn X1(PB_14);DigitalIn X2(PB_15);
-//DigitalIn Y0(PB_9) ;DigitalIn Y1(PB_8) ;DigitalIn Y2(PC_9) ;
char T[32][16][4]; // Tampon affichage 4 temps R1R2V1V2B1B2 32x32 (2*16 )
char I[32][32][3]; // Y X rvb .. Image 32x32 en RVB 0 à 15 0: noir
@@ -44,13 +40,8 @@
int bcl ;
#include "LED.h" // transferts LED <>401
-//#include "tests.h" // oulils de test ( pas forcement utiles)
-//#include "serie.h" // transfert RX 401<>1768
+#include "char.h" // transfert RX 401<>1768
#include "draw.h" // le tableau effectue un programme dans draw
-//#include "etatbmp.h" // le tableau reagit à des commandes du 1768 r g
-//#include "wdt.h" // watch dog securité
-
-
//***************************************************fin wdt
void init ()
@@ -60,8 +51,7 @@
ptfin = 54 ; // preset au cas ou trame de commande
dx = 0 ; dy = 0 ; // recherche adresse du tableau dans un 8*8
ax = 0 ; ay = 0; // offset a ajouter a dx et dy pour mouvement
- etat = 'd' ; // d draw état natif au reveil
- longtempsa0 = 0 ; trop = 0 ;
+ // etat = 'd' ; // d draw état natif au reveil
Tr(); // efface T
Ir(); // efface I
ordrefait = 0;
@@ -72,12 +62,12 @@
init(); // initialisations importantes
//
-while(1)
+while(1) // boucle sans fin ( temps d'execution 30 ms )
{
- if ( etat == 'd' ) draw(); // on est en draw d'un programme local ( TR ) sur une matrice
+ draw(); // dans draw.h c'est le lieu de votre programme en Tr
- IversT(); // recharge i vers T
- Taffi(); // on met T vers les LEDs
-
+ IversT(); // recharge votre image I vers T
+ Taffi(); // passe T vers les LEDs
+ Ir(); // efface le dessin dans image I
}
}