s
Dependencies: mbed
Fork of LAB08_Oppgave1 by
main.cpp
- Committer:
- Voldread
- Date:
- 2015-10-22
- Revision:
- 1:8717e146d58f
- Parent:
- 0:cf9946c35521
File content as of revision 1:8717e146d58f:
#include "mbed.h" PwmOut pwmLed(PB_9); int main() { pwmLed.period(0.020); // 20ms Periode tid //Set the led ouput duty-cycle to 1% float brightness=0.01; pwmLed=brightness; while(1) { printf("Hva skal lysstyrken vere?\n"); scanf("%f", &brightness); //Set the ouput duty-cycle, specified as a percentage pwmLed = brightness; printf("%1.3f \n \r",brightness); } }