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.
Revision 0:e1e3c8d3300c, committed 2014-03-27
- Comitter:
- tim007
- Date:
- Thu Mar 27 18:38:06 2014 +0000
- Commit message:
- LV4_tim007_grupa7
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 |
diff -r 000000000000 -r e1e3c8d3300c main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Thu Mar 27 18:38:06 2014 +0000 @@ -0,0 +1,43 @@ +#include "mbed.h" +BusOut disp(dp26,dp27,dp5,dp6,dp28,dp1,dp2); +DigitalOut tacka(dp4); +int brojevi[10]={0x40,0x79,0x24,0x30,0x19,0x12,0x02,0x78,0x00,0x10}; +DigitalOut prvi(dp23); +DigitalOut drugi(dp24); +DigitalOut treci(dp25); +AnalogIn ulaz(dp9); + +void Ispisi(float broj){ + //if(broj>=0&&broj<=9){ + int prva=(int)(broj / 100) % 10;//(int)(broj*100)%10; + int druga=(int)(broj / 10) % 10;//(broj*100)%100-prva; + int treca=(int)(broj) % 10;//(int)broj; + disp=brojevi[prva]; + prvi=0; + wait(0.001); + prvi=1; + disp=brojevi[druga]; + drugi=0; + wait(0.001); + drugi=1; + disp=brojevi[treca]; + treci=0; + tacka=0; + wait(0.001); + treci=1; + tacka=1; + +} + +int main() { + int br=0; + float vrijednost=ulaz*3.3*100; + while(1) { + if(br==100){ + vrijednost=ulaz*3.3*100; + br=0; + } + Ispisi(vrijednost); + br++; + } +}
diff -r 000000000000 -r e1e3c8d3300c mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Thu Mar 27 18:38:06 2014 +0000 @@ -0,0 +1,1 @@ +http://world3.dev.mbed.org/users/mbed_official/code/mbed/builds/824293ae5e43 \ No newline at end of file