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.
Revision 0:21869cfbd794, committed 2020-02-08
- Comitter:
- jlemap
- Date:
- Sat Feb 08 03:08:14 2020 +0000
- Commit message:
- DIENTE DE SIERRA
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
| mbed.bld | Show annotated file Show diff for this revision Revisions of this file |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Sat Feb 08 03:08:14 2020 +0000
@@ -0,0 +1,24 @@
+#include "mbed.h"
+Serial PC(PA_2,PA_3,115200);
+
+AnalogOut Aout (PA_4);
+AnalogIn Ain (PC_1);
+float lectura;
+float i=0;
+
+int main() {
+ while(1) {
+ for (i=0; i<1; i++){
+ Aout =1;
+ lectura=Ain.read();
+ PC.printf("%1.0f \r\n",lectura);
+ wait(0.5);
+ }
+ for (i=0; i<1; i++){
+ Aout =0;
+ lectura=Ain.read();
+ PC.printf("%1.0f \r\n",lectura);
+ wait(0.5);
+ }
+ }
+ }
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Sat Feb 08 03:08:14 2020 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400 \ No newline at end of file