Example code 12

Dependencies:   mbed-rtos mbed

Fork of STMNucleoF401RE_ExampleCode_12_ServoMotor by 20161020-Corso Rapid Prototyping with STM32Nucleo

Circuito

/media/uploads/perlatecnica/servomotorepotenziometro.png

Files at this revision

API Documentation at this revision

Comitter:
perlatecnica
Date:
Fri Apr 29 14:16:40 2016 +0000
Parent:
3:b1a16fe3265f
Commit message:
v1.2 Eliminata unita' di misura dalla lettura del valore anoalogico

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Mon Feb 29 15:04:49 2016 +0000
+++ b/main.cpp	Fri Apr 29 14:16:40 2016 +0000
@@ -36,7 +36,7 @@
 void runmotor_threadfunc(void const *args) {
     while(true){
       meas = analog_value.read(); // Reads the analog input value (value from 0.0 to 1.0)
-      printf("measure = %.2f mV\r\n", meas);
+      printf("measure = %.2f \r\n", meas);
       //printf("pwm set to %.2f %%\r\n", mypwm.read() * 100);
       dutycycle = meas*2/1000;
        // Set PWM period