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:36d4a66995e6, committed 2015-03-22
- Comitter:
- tknara
- Date:
- Sun Mar 22 05:19:58 2015 +0000
- Child:
- 1:daff0eea2103
- Commit message:
- ??????????
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 Mar 22 05:19:58 2015 +0000
@@ -0,0 +1,20 @@
+/*
+このプログラムはアナログスティックの角度を求めることを目的とする
+*/
+#include "mbed.h"
+#define pi 3.141592
+
+AnalogIn stickx(p16);
+AnalogIn sticky(p17);
+Serial pc(USBTX,USBRX);
+int main() {
+ float x,y,theta,deg;
+ while(1) {
+ x = stickx;
+ y = sticky;
+ theta = atan(x/y);
+ deg = theta * 180 / pi;
+ printf("deg<<%f\n",deg);
+ wait(1);
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Sun Mar 22 05:19:58 2015 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/487b796308b0 \ No newline at end of file