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
main.cpp
- Committer:
- OCHIRIO
- Date:
- 2018-12-05
- Revision:
- 0:0a87a16dfdf6
File content as of revision 0:0a87a16dfdf6:
#include "mbed.h" Serial xbee1(dp16, dp15); AnalogIn analog_value(dp13); DigitalOut myled(LED1); DigitalOut led(dp24); Serial pc(USBTX, USBRX); int main() { int count = 0; float meas, temp; printf("\r\nAnalogIn example\r\n"); while(1) { meas= analog_value.read(); meas=meas*3300; temp=0.1*meas-50; printf("%d: ochi,temp = %.1f C\r\n" ,count++ ,temp); if(temp>26.0){ led.write (1.0); } else{ led.write(0.0); } wait(1.0); } }