![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Amer Ratkovic Emir Mujacic
Revision 0:a077c8c0906b, committed 2014-05-08
- Comitter:
- tim003
- Date:
- Thu May 08 14:05:42 2014 +0000
- Commit message:
- LAB8-PAI-Grupa5-Tim003-Zadatak3
Changed in this revision
diff -r 000000000000 -r a077c8c0906b N5110.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/N5110.lib Thu May 08 14:05:42 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/eencae/code/N5110/#adb79338d40f
diff -r 000000000000 -r a077c8c0906b main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Thu May 08 14:05:42 2014 +0000 @@ -0,0 +1,59 @@ +#include "mbed.h" +#include "N5110.h" +Serial PC (USBTX, USBRX); +N5110 lcd(dp4,dp24,dp23,dp25,dp2,dp6,dp18); +DigitalOut enable(dp14); +Ticker t; + + +int main() +{ + enable=1; + lcd.init(); + lcd.setXYAddress(0,0); + lcd.refresh(); + int x=0, y=0; + // t.attach(&fukcija); + while(1){ + // 1 - enter 2-delete 3 -backspace + char a= PC.getc(); + if(a=='1') + { + //lcd.printChar('\n'); + if(y==6) y=0; + lcd.setXYAddress(0,y+1); + } + if(a=='2') + { + lcd.clear(); + lcd.setXYAddress(0,0); + } + if(a=='3') + { + x--; + + if(x>=0) + { + lcd.setXYAddress(x,y); + lcd.printChar(' '); + lcd.setXYAddress(x,y); + + } + else + { + x=77;y--; + lcd.setXYAddress(x,y); + lcd.printChar(' '); + lcd.setXYAddress(x,y); + } + } + if(a!='1' && a!='2' && a!='3') + { + lcd.printChar(a); + x++; + if(x>83){ y++; x=0;} + } + } + + +} \ No newline at end of file
diff -r 000000000000 -r a077c8c0906b mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Thu May 08 14:05:42 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/8a40adfe8776 \ No newline at end of file