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.
Dependencies: mbed
Revision 0:e507ed1402e5, committed 2019-09-22
- Comitter:
- Javierdf
- Date:
- Sun Sep 22 03:08:12 2019 +0000
- Commit message:
- creat soun tiker
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 Sun Sep 22 03:08:12 2019 +0000
@@ -0,0 +1,39 @@
+#include "mbed.h"
+
+Ticker flipper;
+Serial pc(USBTX,USBRX);
+AnalogIn a1(A0);
+DigitalOut hz(D2);
+int y;
+
+void tono_on()
+{
+ if(y>100)
+ {
+ hz=1;
+
+ }
+ else hz=0;
+}
+/*void tono_off()
+{
+ if(y>100)
+ {
+ hz=0;
+ }
+}*/
+
+
+int main()
+{
+ flipper.attach(&tono_on,0.001 );
+
+ while (true)
+ {
+ y=270*a1.read();
+ //flipper.attach(&tono_on,0.01 );
+ //flipper.attach(&tono_off,0.001 );
+ pc.printf("%d\n",y);
+
+ }
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Sun Sep 22 03:08:12 2019 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/fb8e0ae1cceb \ No newline at end of file