Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed DRV88255 TextLCD Ping mbed-rtos
main.cpp@4:4011a1562a77, 2016-06-08 (annotated)
- Committer:
- 6366295
- Date:
- Wed Jun 08 13:16:32 2016 +0000
- Revision:
- 4:4011a1562a77
- Parent:
- 2:f6ebc225f232
- Child:
- 6:067e999b9c6e
Changed ppt formula
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
6366295 | 0:dab140a197e0 | 1 | #include "SalinityController.h" |
6366295 | 0:dab140a197e0 | 2 | #include "TemperatureController.h" |
6366295 | 2:f6ebc225f232 | 3 | #include "MotorController.h" |
6366295 | 0:dab140a197e0 | 4 | |
6366295 | 0:dab140a197e0 | 5 | #include "mbed.h" |
6366295 | 0:dab140a197e0 | 6 | |
6366295 | 0:dab140a197e0 | 7 | int main() |
6366295 | 0:dab140a197e0 | 8 | { |
6366295 | 0:dab140a197e0 | 9 | int count; |
6366295 | 0:dab140a197e0 | 10 | |
6366295 | 0:dab140a197e0 | 11 | SalinityController salt; |
6366295 | 0:dab140a197e0 | 12 | TemperatureController temperature; |
6366295 | 2:f6ebc225f232 | 13 | MotorController motor; |
6366295 | 2:f6ebc225f232 | 14 | |
6366295 | 4:4011a1562a77 | 15 | // for(int i = 0; i < 20; i++) |
6366295 | 4:4011a1562a77 | 16 | // { |
6366295 | 4:4011a1562a77 | 17 | // motor.test(); |
6366295 | 4:4011a1562a77 | 18 | // motor.test2(); |
6366295 | 4:4011a1562a77 | 19 | // } |
6366295 | 0:dab140a197e0 | 20 | |
6366295 | 1:eb527bc93b62 | 21 | while(1) { |
6366295 | 0:dab140a197e0 | 22 | printf("%d> ", count); |
6366295 | 0:dab140a197e0 | 23 | |
6366295 | 0:dab140a197e0 | 24 | salt.displayPPT(); |
6366295 | 0:dab140a197e0 | 25 | |
6366295 | 1:eb527bc93b62 | 26 | temperature.displayTemperature(); |
6366295 | 1:eb527bc93b62 | 27 | |
6366295 | 1:eb527bc93b62 | 28 | temperature.controlHeater(); |
6366295 | 0:dab140a197e0 | 29 | |
6366295 | 0:dab140a197e0 | 30 | count++; |
6366295 | 0:dab140a197e0 | 31 | |
6366295 | 1:eb527bc93b62 | 32 | wait(0.1); |
6366295 | 0:dab140a197e0 | 33 | } |
6366295 | 0:dab140a197e0 | 34 | } |