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
00001 #include "mbed.h" 00002 00003 00004 AnalogIn analog_value(A0); 00005 00006 AnalogIn analog_value1(A1); 00007 00008 DigitalOut led(LED1); 00009 00010 int main() 00011 { 00012 00013 // PT1000 00014 float meas_r; 00015 float meas_v; 00016 00017 // Termopora 00018 float meas_r1; 00019 float meas_v1; 00020 00021 printf("\nAnalogIn example\n"); 00022 00023 while(1) { 00024 00025 // TERMOPORA 00026 meas_r1 = analog_value.read(); // Read the analog input value (value from 0.0 to 1.0 = full ADC conversion range) 00027 //meas_v1 = ((meas_r1 * 3300) / 100) * 0.41; // Converts value in the 0V-3.3V range. matuojama itampa reikia dalinti is 100 (gain) ir paskui padauginti is 0.41uV/C. 00028 meas_v1 = meas_r1 * 3300; // Converts value in the 0V-3.3V range. matuojama itampa reikia dalinti is 100 (gain) ir paskui padauginti is 0.41uV/C. 00029 00030 // PT1000 00031 meas_r = analog_value1.read(); // Read the analog input value (value from 0.0 to 1.0 = full ADC conversion range) 00032 meas_v = meas_r * 3300; // Converts value in the 0V-3.3V range 00033 00034 00035 // Display values 00036 // printf("pt1000 = %f = %.0f mV \n\r", meas_r, meas_v); 00037 //printf("termopora = %f = %.0f C \n", meas_r1, fTemp); 00038 printf("termopora = %f = %.0f C \n\r", meas_r1, meas_v1); 00039 00040 wait(0.2); // 0.5 second 00041 } 00042 }
Generated on Sun Aug 28 2022 11:42:30 by
1.7.2