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
Revision 0:18e57ab7c8b8, committed 2019-03-08
- Comitter:
- guillaume6544
- Date:
- Fri Mar 08 12:21:43 2019 +0000
- Commit message:
- temp
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
| mbed.bld | Show annotated file Show diff for this revision Revisions of this file |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Fri Mar 08 12:21:43 2019 +0000
@@ -0,0 +1,38 @@
+#include "mbed.h"
+
+/*------------------------------------------------------------------------------
+Before to use this example, ensure that you an hyperterminal installed on your
+computer. More info here: https://developer.mbed.org/handbook/Terminals
+
+The default serial comm port uses the SERIAL_TX and SERIAL_RX pins (see their
+definition in the PinNames.h file).
+
+The default serial configuration in this case is 9600 bauds, 8-bit data, no parity
+
+If you want to change the baudrate for example, you have to redeclare the
+serial object in your code:
+
+Serial pc(SERIAL_TX, SERIAL_RX);
+
+Then, you can modify the baudrate and print like this:
+
+pc.baud(115200);
+pc.printf("Hello World !\n");
+------------------------------------------------------------------------------*/
+
+DigitalOut led(LED1);
+
+int main()
+{
+ AnalogIn LM35(A2);
+ float temperature;
+
+
+
+ while(1) {
+ wait(1); // 1 second
+ temperature = LM35.read();
+ temperature = temperature*3.685503686*100;
+ printf("Température = %f \n\r",temperature);
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Fri Mar 08 12:21:43 2019 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400 \ No newline at end of file