![](/media/cache/profiles/kHsmpCWw_400x400.png.50x50_q85.png)
Primer codigo
Revision 5:3f4a420fd9b1, committed 2018-09-09
- Comitter:
- djinn77
- Date:
- Sun Sep 09 04:52:48 2018 +0000
- Parent:
- 4:5b4114791035
- Commit message:
- Mejora ciclo de impresion de desplazamiento
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 5b4114791035 -r 3f4a420fd9b1 main.cpp --- a/main.cpp Fri Sep 07 12:30:22 2018 +0000 +++ b/main.cpp Sun Sep 09 04:52:48 2018 +0000 @@ -18,21 +18,15 @@ void imprimir(){ - // Sele aplicac corriento a todas para facilitar selecccion - + // Sele aplica corrmiento a las posiciones del vecteor para facilitar selecccion de la posicion. + for(int i=0;i<=12;i++) { - - deviceM.write_digit(1,1,matriz[0]>>i); - deviceM.write_digit(1,2,matriz[1]>>i); - deviceM.write_digit(1,3,matriz[2]>>i); - deviceM.write_digit(1,4,matriz[3]>>i); - deviceM.write_digit(1,5,matriz[4]>>i); - deviceM.write_digit(1,6,matriz[5]>>i); - deviceM.write_digit(1,7,matriz[6]>>i); - deviceM.write_digit(1,8,matriz[7]>>i); - wait(1.0); - + for (int j= 1; j<=8; j++){ + + deviceM.write_digit(1,j,matriz[j-1]>>i); + } + wait(1.0); } }