Jesi Miranda
/
VL53L1X_Filter_TESTING_BACKUP
Back-up File from jvfausto
main.cpp
- Committer:
- JesiMiranda
- Date:
- 2020-01-25
- Revision:
- 6:28da18c8ba47
- Parent:
- 5:40d3acd18c03
File content as of revision 6:28da18c8ba47:
#include "mbed.h" #include "VL53L1X.h" Serial pc(USBTX,USBRX, 57600); VL53L1X sensor1(D4, D5, D6); //D6 //VL53L1X sensor2(D4, D5, D7); //VL53L1X sensor3(D4, D5, D8); //VL53L1X sensor4(D4, D5, D9); /*VL53L1X frontRight(PD_13, PD_12, D3); //(SCL, SDA, shutdown) VL53L1X frontRight2(PD_13, PD_12, D2); //(SCL, SDA, shutdown) VL53L1X frontRight3(PD_13, PD_12, D4); //(SCL, SDA, shutdown) VL53L1X frontRight4(PD_13, PD_12, D5); //(SCL, SDA, shutdown) */ int main() { wait(5); /* frontRight.initReading(0x25,50000); frontRight2.initReading(0x27,50000); frontRight3.initReading(0x35,50000); frontRight4.initReading(0x37,50000);/* */sensor1.initReading(0x27,50000); //sensor2.initReading(0x35,50000); //sensor3.initReading(0x37,50000); while(1) { pc.printf("%d, ", sensor1.readFromOneSensor()); //pc.printf("%d, ", sensor2.readFromOneSensor()); //pc.printf("%d, ", sensor3.readFromOneSensor()); pc.printf("\r\n"); /* pc.printf("%d hello\r\n", frontRight.readFromOneSensor()); pc.printf("%d hello\r\n", frontRight2.readFromOneSensor()); pc.printf("%d hello\r\n", frontRight3.readFromOneSensor()); pc.printf("%d hello\r\n", frontRight4.readFromOneSensor()); */ } }