ping pong projekt

Dependencies:   interupt mbed resetpolja pozicijaLoptice resetALL Ispis PozicijaOdbijaca

projekt je izveden s 8x8 led matricom na kojoj se igra ping pon pomoću potenciometara. https://os.mbed.com/media/uploads/atopcic/whatsapp_image_2021-02-22_at_09.08.54.jpeg

Files at this revision

API Documentation at this revision

Comitter:
atopcic
Date:
Mon Feb 22 08:33:54 2021 +0000
Commit message:
datoteka

Changed in this revision

Ispis.lib Show annotated file Show diff for this revision Revisions of this file
PozicijaOdbijaca.lib Show annotated file Show diff for this revision Revisions of this file
interupt.lib Show annotated file Show diff for this revision Revisions of this file
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
pozicijaLoptice.lib Show annotated file Show diff for this revision Revisions of this file
resetALL.lib Show annotated file Show diff for this revision Revisions of this file
resetpolja.lib Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Ispis.lib	Mon Feb 22 08:33:54 2021 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/teams/TVZ2020/code/Ispis/#ccb8b3997ba7
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/PozicijaOdbijaca.lib	Mon Feb 22 08:33:54 2021 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/atopcic/code/PozicijaOdbijaca/#8f75fa19100b
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/interupt.lib	Mon Feb 22 08:33:54 2021 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/atopcic/code/interupt/#11c592a697fb
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Mon Feb 22 08:33:54 2021 +0000
@@ -0,0 +1,50 @@
+#include "mbed.h"
+#include "resetpolja.h"
+#include "Ispis.h"
+#include "PozicijaOdbijaca.h"
+#include "pozicijaLoptice.h"
+#include "reset_polja.h"
+#include "Interupt.h"
+
+extern int polje[8][8];
+extern int StartStop;
+extern Timer  timer1,timer3,debounce;
+Timer timer2;
+extern InterruptIn button;
+
+void ispis(void);
+void pozicija_odbijaca(void);
+void PozicijaLoptice (void);
+void ResetPoljaLoptice (void);
+void ResetPolja (void);
+void toggle(void); 
+ 
+int main() 
+{   
+ L8=0; L9=0;    L10=0;    L11=0;   L12=0;    L13=0;    L14=0;    L15=0;    G1=0;    G2=0;    G3=0;
+ timer1.start(); // start timer counting
+ timer2.start();
+ timer3.start();
+ 
+ while(1) {
+        
+        if(timer2.read_ms() >= 400){
+        ResetPoljaLoptice();
+        PozicijaLoptice(); 
+        timer2.reset();
+        timer3.reset();
+        }      
+        
+ pozicija_odbijaca(); 
+ ispis(); 
+ debounce.start();
+ button.rise(&toggle);
+ while(StartStop==0){ResetPolja(); ispis();}
+}
+}
+
+
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Mon Feb 22 08:33:54 2021 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pozicijaLoptice.lib	Mon Feb 22 08:33:54 2021 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/atopcic/code/pozicijaLoptice/#7aa751de1e82
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/resetALL.lib	Mon Feb 22 08:33:54 2021 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/atopcic/code/resetALL/#940bc7e11621
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/resetpolja.lib	Mon Feb 22 08:33:54 2021 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/atopcic/code/resetpolja/#406a3c5e4754