Ted Grosch
/
Nucleo_TOF_I2C_DISCO
Export to MBED Studio for DISCO Board
main.cpp@2:f30187bb3fbd, 2020-10-25 (annotated)
- Committer:
- tgrosch
- Date:
- Sun Oct 25 10:16:43 2020 +0000
- Revision:
- 2:f30187bb3fbd
- Parent:
- 1:8567a29d4699
- Child:
- 3:4e641a32e087
New version for DISCO baord
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 | 2:f30187bb3fbd | 5 | //I2C i2c(D14, D15); // for NUCLEO board |
tgrosch | 2:f30187bb3fbd | 6 | I2C i2c(PB_6, PB_7); // for Disco |
tgrosch | 1:8567a29d4699 | 7 | Serial pc(SERIAL_TX, SERIAL_RX); //TODo fice this pc host iissue |
tgrosch | 0:62b846b3988a | 8 | |
tgrosch | 0:62b846b3988a | 9 | #include "OPT3101device.h" |
tgrosch | 0:62b846b3988a | 10 | |
tgrosch | 0:62b846b3988a | 11 | // main() runs in its own thread in the OS |
tgrosch | 0:62b846b3988a | 12 | |
tgrosch | 0:62b846b3988a | 13 | int main() |
tgrosch | 0:62b846b3988a | 14 | { |
tgrosch | 0:62b846b3988a | 15 | host.printf("-------------------------------\r\n"); |
tgrosch | 0:62b846b3988a | 16 | host.printf("Starting Main Program Execution\r\n"); |
tgrosch | 0:62b846b3988a | 17 | host.printf("-------------------------------\r\n"); |
tgrosch | 0:62b846b3988a | 18 | |
tgrosch | 0:62b846b3988a | 19 | OPT3101::device dev; ///* Declared variable dev of class OPT3101::device |
tgrosch | 0:62b846b3988a | 20 | dev.resetInitAndViewData(3000, false); |
tgrosch | 0:62b846b3988a | 21 | while (true) { |
tgrosch | 0:62b846b3988a | 22 | |
tgrosch | 0:62b846b3988a | 23 | } |
tgrosch | 0:62b846b3988a | 24 | } |