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: QEI MPU6050 TB6612FNG
Diff: main.cpp
- Revision:
- 0:d6107da1cba0
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Fri May 07 03:27:43 2021 +0000
@@ -0,0 +1,18 @@
+#include "mbed.h"
+#include "MPU6050.h"
+#include "QEI.h"
+#include "TB6612FNG.h"
+
+MPU6050 mpu1(p9,p10,0x68);
+MPU6050 mpu2(p9,p10,0x69);
+Serial pc(USBTX,USBRX);
+QEI wheel(p22, p21, NC, 12, QEI::X4_ENCODING);
+
+
+int main(){
+ while(1){
+ pc.printf("%.2f\n", ((float)wheel.getPulses()));
+ pc.printf("%.2f\n", ((float)wheel.getRevolutions()));
+ wait(0.1);
+ }
+}
\ No newline at end of file