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.
main.cpp
00001 00002 #include "mbed.h" 00003 #include <stdio.h> 00004 #include <string.h> 00005 00006 00007 00008 00009 Serial BT(PTE0,PTE1); //puertos del FRDM para el modem 00010 00011 int num, num2, i,i2,j,j2,k,k2; 00012 char med[3]; 00013 00014 AnalogIn P1(PTB1); //Canal 1 00015 AnalogIn P2(PTB0); //Canal 2 00016 00017 int main(void) 00018 { 00019 00020 BT.baud(9600); // asigno baudios y configuro puerto serie de la usart 00021 BT.format(8,Serial::None,1); 00022 while(1) { 00023 //leo puerto analogico canal 1 00024 wait(0.5); 00025 num = P1*1000; //agrando el numero de cero a mil 00026 00027 //leo puerto analogico canal 2 00028 wait(0.5); 00029 num2 = P2*1000; //agrando el numero de cero a mil 00030 wait(0.5); 00031 BT.printf("%i, %i ", num, num2); 00032 00033 } 00034 }
Generated on Tue Jul 19 2022 01:04:17 by
1.7.2