Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: main.cpp
- Revision:
- 1:6c3527fb3bc1
- Parent:
- 0:14b6781d6f40
--- a/main.cpp Sat Feb 25 19:39:10 2017 +0000
+++ b/main.cpp Fri Mar 10 20:40:48 2017 +0000
@@ -1,8 +1,8 @@
#include "mbed.h"
-#include "rtos.h"
DigitalOut led( LED2 );
Serial pc( USBTX , USBRX );
+AnalogOut out( A4 );
int main( void ){
@@ -11,10 +11,12 @@
while( true ){
wait( 0.5 );
- led = 0;
+ led = 0;
+ out.write( 3.0 );
pc.printf("LED = %d \n\r",led.read());
wait( 0.5 );
- led = 1;
+ led = 1;
+ out.write( 0.0 );
pc.printf("LED = %d \n\r",led.read());
}