![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Export to MBED Studio for DISCO Board
main.cpp@1:8567a29d4699, 2020-10-25 (annotated)
- Committer:
- tgrosch
- Date:
- Sun Oct 25 01:51:13 2020 +0000
- Revision:
- 1:8567a29d4699
- Parent:
- 0:62b846b3988a
- Child:
- 2:f30187bb3fbd
Transfer to MBED Studio
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 | 1:8567a29d4699 | 6 | Serial pc(SERIAL_TX, SERIAL_RX); //TODo fice this pc host iissue |
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 | } |