Potentiometrillä ohjattu DC-moottori DC-motor controlled by potentiometer

Dependencies:   microbit

Files at this revision

API Documentation at this revision

Comitter:
tyynetyyne
Date:
Thu Aug 16 10:42:18 2018 +0000
Commit message:
Potentiometrill? ohjattu dc-moottori;

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
microbit.lib Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r 5d161ce7187b main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Aug 16 10:42:18 2018 +0000
@@ -0,0 +1,15 @@
+
+#include "MicroBit.h"
+
+MicroBit uBit;
+int arvo = 0;
+
+int main()
+{
+    uBit.init();
+    while(1){
+    arvo = uBit.io.P1.getAnalogValue();   
+    uBit.io.P0.setAnalogValue(arvo);         
+    uBit.sleep(1);
+    }
+}
diff -r 000000000000 -r 5d161ce7187b microbit.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/microbit.lib	Thu Aug 16 10:42:18 2018 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/teams/Lancaster-University/code/microbit/#4b89e7e3494f