ArmfulKST / Mbed 2 deprecated SawtoothOut

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include "mbed.h"
00002 
00003 
00004 AnalogOut my_output(PA_4);
00005 
00006 Serial pc(D8, D2);
00007 
00008 int x=0;
00009 
00010 uint16_t aout;
00011 
00012 
00013 int main() {
00014     while(1) {
00015         x=0;
00016         while( x<4096)
00017         {
00018             my_output.write_u16(x);
00019             x=x+1;
00020            wait_us(50);
00021         }
00022         
00023      
00024         //pc.printf("%d\n\r", x);
00025       
00026     }
00027 }