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: PS3
Diff: main.cpp
- Revision:
- 0:f66f288a5d4d
- Child:
- 1:67eb13b42312
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Thu Aug 30 06:12:25 2018 +0000
@@ -0,0 +1,22 @@
+#include "mbed.h"
+#include "PS3.h"
+
+PS3 ps3(PC_12, PD_2);;
+Serial pc(USBTX, USBRX, 230400);
+
+int main()
+{
+ pc.printf("start\rn");
+ while(true) {
+ for(int i = 0; i < 4; i++) {
+ pc.printf("%d ", ps3.getStick(i));
+ }
+ for(int i = 0; i < 2; i++) {
+ pc.printf("%d ", ps3.getTrigger(i));
+ }
+ for(int i = 0; i < 15; i++) {
+ pc.printf("%d ", ps3.getButton(i));
+ }
+ pc.printf("\r\n");
+ }
+}
\ No newline at end of file