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 4:f7520f4259d8, committed 2020-11-20
- Comitter:
- manavvats
- Date:
- Fri Nov 20 20:24:24 2020 +0000
- Parent:
- 3:7777bbcf11f6
- Commit message:
- Revised for PCB3
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Thu Aug 09 19:39:36 2018 +0000
+++ b/main.cpp Fri Nov 20 20:24:24 2020 +0000
@@ -1,28 +1,22 @@
#include "mbed.h"
#include "VL53L1X.h"
-
+
Serial pc(USBTX,USBRX);
bool s1_init = false;
bool s2_init = false;
bool s3_init = false;
bool s4_init = false;
-VL53L1X sensor1(D14, D15, D0);
-VL53L1X sensor2(D14, D15, D1);
-VL53L1X sensor3(D14, D15, D2);
-VL53L1X sensor4(D14, D15, D3);
-
+VL53L1X sensor1(D0, D1, D5);
+VL53L1X sensor2(D0, D1, D6);
+
int main()
{
sensor1.initReading(0x25,50000);
sensor2.initReading(0x27,50000);
- sensor3.initReading(0x35,50000);
- sensor4.initReading(0x37,50000);
-
+
while(1)
{
- pc.printf("%d, ", sensor1.readFromOneSensor());
- pc.printf("%d, ", sensor2.readFromOneSensor());
- pc.printf("%d, ", sensor3.readFromOneSensor());
- pc.printf("%d\r\n", sensor4.readFromOneSensor());
+ pc.printf("PCB3Unit(1): %d, ", sensor1.readFromOneSensor());
+ pc.printf("%d\r\n", sensor2.readFromOneSensor());
}
-}
+}
\ No newline at end of file