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: mbed CrazyflieSensors
Revision 0:32868d4b0196, committed 2022-02-14
- Comitter:
- osaka
- Date:
- Mon Feb 14 08:53:49 2022 +0000
- Commit message:
- test code
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CrazyflieSensors.lib Mon Feb 14 08:53:49 2022 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/fbob/code/CrazyflieSensors/#e07de535b86f
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Mon Feb 14 08:53:49 2022 +0000
@@ -0,0 +1,31 @@
+#include "mbed.h"
+#include "PMW3901.h"
+#include "VL53L0X.h"
+
+Serial pc(USBTX, USBRX); // tx, rx
+//SPI spi(PB_5, PB_4, PB_3); // mosi, miso, sclk
+//DigitalOut cs(PA_4);
+
+int main()
+{
+ pc.baud(38400);
+
+ PMW3901 pmw(PB_5, PB_4, PB_3, PA_4);
+ VL53L0X vl(PB_9, PB_8);
+
+ int init_pmw = pmw.init();
+ int init_vl = vl.init();
+
+ pc.printf("initialize pmw: %d\r\n", init_pmw);
+ pc.printf("initialize vl: %d\r\n", init_vl);
+
+ while (true)
+ {
+ pmw.read();
+ vl.read();
+
+ pc.printf("%f %f %f\r\n", pmw.px, pmw.py, vl.d);
+
+ wait(0.01);
+ }
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Mon Feb 14 08:53:49 2022 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400 \ No newline at end of file