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:
- 30:f7518060fc89
- Parent:
- 29:734b61eca6df
- Child:
- 31:5c22609a9fe7
--- a/main.cpp Wed Oct 16 00:42:26 2019 +0000
+++ b/main.cpp Tue Oct 22 19:20:06 2019 +0000
@@ -1,23 +1,23 @@
#include "mbed.h"
-DigitalOut red(LED1);
Serial pc(USBTX,USBRX);
-DigitalIn boton1(PTC6);
-DigitalIn boton2(PTA4);
+
+
int main(){
- red=0;
- while(1){
- /*while(boton1 || boton2){
- red = 1;
- pc.printf("\nEstas presionando el boton :o");
- }
- red=0;*/
-////////////////////////////////////////////////////////////////////
- if(!boton1 || !boton2){
- red =1 ;
- pc.printf("\nEstas presionando el boton :o");
- }
- else{
- red=0;
- }
- }
+ const int filas=3;
+ const int columnas=3;
+ int matriz [filas][columnas];
+ int i,j;
+ int contador=0;
+
+ for (i=0;i<filas;i++)
+ {
+ for (j=0;j<columnas;j++)
+ { contador = contador+1;
+ matriz [i][j]=contador;
+ pc.printf("%d\t", matriz[i][j]);
+ }
+ pc.printf("\n");
+ }
+
+
}
\ No newline at end of file