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.
main.cpp@4:f7520f4259d8, 2020-11-20 (annotated)
- Committer:
- manavvats
- Date:
- Fri Nov 20 20:24:24 2020 +0000
- Revision:
- 4:f7520f4259d8
- Parent:
- 3:7777bbcf11f6
Revised for PCB3
Who changed what in which revision?
| User | Revision | Line number | New contents of line | 
|---|---|---|---|
| jvfausto | 1:e54ded4af43a | 1 | #include "mbed.h" | 
| jvfausto | 1:e54ded4af43a | 2 | #include "VL53L1X.h" | 
| manavvats | 4:f7520f4259d8 | 3 | |
| jvfausto | 1:e54ded4af43a | 4 | Serial pc(USBTX,USBRX); | 
| jvfausto | 3:7777bbcf11f6 | 5 | bool s1_init = false; | 
| jvfausto | 3:7777bbcf11f6 | 6 | bool s2_init = false; | 
| jvfausto | 3:7777bbcf11f6 | 7 | bool s3_init = false; | 
| jvfausto | 3:7777bbcf11f6 | 8 | bool s4_init = false; | 
| manavvats | 4:f7520f4259d8 | 9 | VL53L1X sensor1(D0, D1, D5); | 
| manavvats | 4:f7520f4259d8 | 10 | VL53L1X sensor2(D0, D1, D6); | 
| manavvats | 4:f7520f4259d8 | 11 | |
| jvfausto | 1:e54ded4af43a | 12 | int main() | 
| jvfausto | 2:f570ff03fb81 | 13 | { | 
| jvfausto | 3:7777bbcf11f6 | 14 | sensor1.initReading(0x25,50000); | 
| jvfausto | 3:7777bbcf11f6 | 15 | sensor2.initReading(0x27,50000); | 
| manavvats | 4:f7520f4259d8 | 16 | |
| jvfausto | 2:f570ff03fb81 | 17 | while(1) | 
| jvfausto | 3:7777bbcf11f6 | 18 | { | 
| manavvats | 4:f7520f4259d8 | 19 | pc.printf("PCB3Unit(1): %d, ", sensor1.readFromOneSensor()); | 
| manavvats | 4:f7520f4259d8 | 20 | pc.printf("%d\r\n", sensor2.readFromOneSensor()); | 
| jvfausto | 1:e54ded4af43a | 21 | } | 
| manavvats | 4:f7520f4259d8 | 22 | } |