sample code for workshop

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
okano
Date:
Fri Apr 10 09:13:56 2015 +0000
Parent:
0:fb4152a5b384
Commit message:
binary value on LEDs

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Fri Apr 10 09:11:42 2015 +0000
+++ b/main.cpp	Fri Apr 10 09:13:56 2015 +0000
@@ -5,7 +5,7 @@
 
 int main() {
     while(1) {
-        leds    = 0xF >> 4 - (int)(ai * 4.0);
+        leds    = (int)(ai * 15.0);
         wait( 0.01 );
     }
 }