Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Diff: main.cpp
- Revision:
- 0:63e75ced7774
--- /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