Team H - TVZ Seminar / Mbed 2 deprecated KTM_01_03_M

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
DudeHD
Date:
Sun Oct 28 21:51:28 2018 +0000
Commit message:
ktm 1 z3

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sun Oct 28 21:51:28 2018 +0000
@@ -0,0 +1,21 @@
+//master program za paralelnu komunikaciju
+BusOut dataout(p21,p22,p23,p24);
+BusOut ledice(LED4,LED3,LED2,LED1);
+DigitalOut strobe(p25);
+DigitalIn busy(p26);
+BusIn datain(p20,p19,p18,p17);
+int main() {
+    datain.mode(PullUp);
+    strobe = 1; //inicijaliziraj strobe liniju
+    wait(2);
+    while(1) {
+        if(busy==0){
+            ledice = datain;
+            dataout = datain;
+            wait(0.1);
+            strobe = 0;
+            wait(0.1);
+            strobe = 1;
+            }
+        //wait(4); //cekaj novi ciklus, nepoznato vrijeme obrade slavea
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Sun Oct 28 21:51:28 2018 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/e95d10626187
\ No newline at end of file