AnalogOut Hello World

Dependencies:   mbed

Use

The AnalogOut API is used to convert a digital number to an analog value. The output value is set as a percentage of the supply voltage. The percentage is specified as a floating point number between 0 to 1. This example demonstrates a ramp from 0 to 1 in 10% increments.

Note

Not all boards support analog output. The board must have a Digital to Analog Converter (DAC) to use the API. The compiler will throw a warning if the AnalogOut API is not available for a target board. Alternatively the target platform will list its components on the Platforms page.

API

API reference.

Import librarymbed

No documentation found.

Files at this revision

API Documentation at this revision

Comitter:
mbedAustin
Date:
Mon Sep 22 20:19:09 2014 +0000
Parent:
3:8b80a1c145ea
Commit message:
removed print statement

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 8b80a1c145ea -r 6c49a5b891dc main.cpp
--- a/main.cpp	Mon Sep 22 20:07:32 2014 +0000
+++ b/main.cpp	Mon Sep 22 20:19:09 2014 +0000
@@ -8,7 +8,6 @@
         for(float i=0.0; i<1.0; i+=0.1) {
             signal = i;
             wait(0.1);
-            printf("Signal = %f\n\r",i);
         }      
     }
 }
\ No newline at end of file