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.
Fork of AnalogIn-HelloWorld by
main.cpp
00001 00002 #include "mbed.h" 00003 00004 00005 AnalogIn ain(A5); 00006 Serial pc(USBTX, USBRX); 00007 00008 00009 int main(void) 00010 { 00011 //Starts ADC Calibration 00012 //Correct's bug in mbed for F303K8 and F334R8. 00013 //mbed do not start adc calibration for STM32F3 mcu's ? 00014 extern ADC_HandleTypeDef AdcHandle; 00015 HAL_ADCEx_Calibration_Start(&AdcHandle, ADC_SINGLE_ENDED); 00016 00017 int nr = 0; 00018 while (1) { 00019 nr++; 00020 pc.printf("nr : %d\n", nr); 00021 pc.printf("normalized: %d \n", ain.read_u16()); 00022 pc.printf("volt: %3.3f\n\n", ain.read()*3.3 ); 00023 wait(1); 00024 } 00025 }
Generated on Mon Jul 18 2022 20:47:01 by
1.7.2
