You are viewing an older revision! See the latest version
AnalogOut
The AnalogOut Interface is used to set the voltage of an analog output pin.
Hello World!¶
Create a sawtooth wave
#include "mbed.h" AnalogOut signal(p18); int main() { while(1) { for(float i=0.0; i<1.0; i+=0.1) { signal = i; wait(0.0001); } } }
API¶
Import librarymbed
Interface¶
![]() |
See the Pinout page for more details |
Details¶
The AnalogOut Interface can be used to set the voltage on the analog output pin somwhere in the range of 0.0v to 3.3v. The 0.0v to 3.3v range of the !AnalogOut can be represented in software as a normalised floating point number from 0.0 to 1.0, or directly as volts or millivolts.