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.
main.cpp
- Committer:
- markschwarzer
- Date:
- 2020-10-15
- Revision:
- 1:b8b505e84b78
- Parent:
- 0:fc115f874555
- Child:
- 2:e6e11d6db1dc
File content as of revision 1:b8b505e84b78:
#include "mbed.h" Serial pc(USBTX, USBRX) ; DigitalOut led1(LED1); DigitalOut led2(LED2); DigitalOut led3(LED3); AnalogIn aI(p19); float T; int V; int main() { int V = (-3.88*10^(-6)*T^2)+(-1.15*10^(-2)*T)+1.8639; aI.read_u16()="V"; pc.printf("V=%d\r\n", V ); while(1) { if (25>=T>20) { led1=!led1; pc.printf("T=%f\r\n", T ); } else if (30>=T>25) { led2=!led2; pc.printf("T=%f\r\n", T ); } else (T>30) { led3=!led3; pc.printf("T=%f\r\n", T ); } } }