Problem with AnalogOut

23 Dec 2011

Hi i write the example from the page: http://mbed.org/handbook/AnalogOut in my program, but how can i hear it? What do i need to hear it?

#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);
        }
    }
}
23 Dec 2011

Something like this http://mbed.org/media/uploads/mbed2f/breadboard_setup_1.jpg

You need a capacitor 1000pf and a earphone socket, or just a capacitor and a speaker, or just use your scope on p18

23 Dec 2011

I have a earphone socket, but how i have to connect it.

23 Dec 2011

Can't you work anything out from the picture, you need a volt meter to check which is positive and negative of earphone socket, then positive goes on p18 and negative on GND zoom in on picture I labelled it good.