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

Dependencies:   microbit

Revision:
0:5d161ce7187b
--- /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);
+    }
+}