Ted Grosch
/
Nucleo_TOF_I2C_DISCO
Export to MBED Studio for DISCO Board
main.cpp@0:62b846b3988a, 2020-10-25 (annotated)
- Committer:
- tgrosch
- Date:
- Sun Oct 25 00:58:24 2020 +0000
- Revision:
- 0:62b846b3988a
- Child:
- 1:8567a29d4699
First successful compile.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
tgrosch | 0:62b846b3988a | 1 | #include "mbed.h" |
tgrosch | 0:62b846b3988a | 2 | |
tgrosch | 0:62b846b3988a | 3 | // Read temperature from LM75BD |
tgrosch | 0:62b846b3988a | 4 | |
tgrosch | 0:62b846b3988a | 5 | I2C i2c(D14, D15); |
tgrosch | 0:62b846b3988a | 6 | Serial pc(SERIAL_TX, SERIAL_RX); |
tgrosch | 0:62b846b3988a | 7 | |
tgrosch | 0:62b846b3988a | 8 | #include "OPT3101device.h" |
tgrosch | 0:62b846b3988a | 9 | |
tgrosch | 0:62b846b3988a | 10 | // main() runs in its own thread in the OS |
tgrosch | 0:62b846b3988a | 11 | |
tgrosch | 0:62b846b3988a | 12 | int main() |
tgrosch | 0:62b846b3988a | 13 | { |
tgrosch | 0:62b846b3988a | 14 | host.printf("-------------------------------\r\n"); |
tgrosch | 0:62b846b3988a | 15 | host.printf("Starting Main Program Execution\r\n"); |
tgrosch | 0:62b846b3988a | 16 | host.printf("-------------------------------\r\n"); |
tgrosch | 0:62b846b3988a | 17 | |
tgrosch | 0:62b846b3988a | 18 | OPT3101::device dev; ///* Declared variable dev of class OPT3101::device |
tgrosch | 0:62b846b3988a | 19 | dev.resetInitAndViewData(3000, false); |
tgrosch | 0:62b846b3988a | 20 | while (true) { |
tgrosch | 0:62b846b3988a | 21 | |
tgrosch | 0:62b846b3988a | 22 | } |
tgrosch | 0:62b846b3988a | 23 | } |