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.
example.cpp
- Committer:
- gakuburu
- Date:
- 2016-10-27
- Revision:
- 8:3c53e18e16e6
File content as of revision 8:3c53e18e16e6:
#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)); } } }