Sweep a servo according to Proximity sensor measure
Dependencies: Servo X_NUCLEO_6180XA1 mbed
Fork of HelloWorld_6180XA1 by
main.cpp@4:ccd62fd7e137, 2015-09-17 (annotated)
- Committer:
- gallonm
- Date:
- Thu Sep 17 10:43:27 2015 +0200
- Revision:
- 4:ccd62fd7e137
- Parent:
- 3:ec91a30891d5
- Child:
- 5:fa65d931bd96
Test Init function and ReadID function
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
gallonm | 0:83c628a58feb | 1 | #include "mbed.h" |
gallonm | 4:ccd62fd7e137 | 2 | #include "vl6180x_class.h" |
gallonm | 0:83c628a58feb | 3 | |
gallonm | 4:ccd62fd7e137 | 4 | #include <string.h> |
gallonm | 4:ccd62fd7e137 | 5 | #include <stdlib.h> |
gallonm | 4:ccd62fd7e137 | 6 | #include <stdio.h> |
gallonm | 4:ccd62fd7e137 | 7 | |
gallonm | 4:ccd62fd7e137 | 8 | void OnErrLog(void){}; |
gallonm | 0:83c628a58feb | 9 | |
gallonm | 4:ccd62fd7e137 | 10 | int main() |
gallonm | 4:ccd62fd7e137 | 11 | { |
gallonm | 4:ccd62fd7e137 | 12 | DevI2C device_i2c(I2C_SDA, I2C_SCL); |
gallonm | 4:ccd62fd7e137 | 13 | VL6180X *sensor1 = new VL6180X(device_i2c); |
gallonm | 4:ccd62fd7e137 | 14 | |
gallonm | 4:ccd62fd7e137 | 15 | |
gallonm | 4:ccd62fd7e137 | 16 | sensor1->Init(); |
gallonm | 4:ccd62fd7e137 | 17 | sensor1->ReadID(); |
gallonm | 4:ccd62fd7e137 | 18 | } |