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 8:3c53e18e16e6, committed 2016-10-27
- Comitter:
- gakuburu
- Date:
- Thu Oct 27 08:56:42 2016 +0000
- Parent:
- 7:5b74ff881644
- Commit message:
- example
Changed in this revision
example.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/example.cpp Thu Oct 27 08:56:42 2016 +0000 @@ -0,0 +1,29 @@ +#include "mbed.h" +#include "LambdaController.h" + +int main(void) +{ + Serial pc(USBTX, USBRX); + pc.baud(9600); + + LambdaController con(D1, D0); + + con.initialize_axis(); + + while(1) + { + if (con.get_error()) + { + pc.printf("error : %d\r\n", con.get_error()); + } + else + { + pc.printf("buttons : %x\r\n", con.get_all_switch()); + pc.printf("1 : %d\r\n", con.get_switch(0)); +// pc.printf("joystick0 : %f\r\n", con.get_axis(con.Stick0X)); +// pc.printf("joystick1 : %f\r\n", con.get_axis(con.Stick0Y)); +// pc.printf("joystick2 : %f\r\n", con.get_axis(con.Stick1X)); +// pc.printf("joystick3 : %f\r\n", con.get_axis(con.Stick1Y)); + } + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Thu Oct 27 08:56:42 2016 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/25aea2a3f4e3 \ No newline at end of file