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:4c2857ed48ec, committed 2014-05-05
- Comitter:
- tim010
- Date:
- Mon May 05 07:44:35 2014 +0000
- Commit message:
- LV8-Grupa1-Tim010-Z3
Changed in this revision
diff -r 000000000000 -r 4c2857ed48ec N5110.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/N5110.lib Mon May 05 07:44:35 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/eencae/code/N5110/#adb79338d40f
diff -r 000000000000 -r 4c2857ed48ec main.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Mon May 05 07:44:35 2014 +0000
@@ -0,0 +1,44 @@
+//LV8-Grupa1-Tim010-Z3
+#include "mbed.h"
+#include "N5110.h"
+//By EnilP, 04.05.2014, ETF PAI
+DigitalOut ENBL (dp14);
+N5110 DISP (dp4, dp24, dp23, dp25, dp2, dp6, dp18);
+Serial PC (USBTX, USBRX);
+Ticker T;
+int eX = 0, eY = 0;
+void DoIt()
+ {
+ if (!PC.readable()) return;
+ char C = PC.getc();
+ DISP.setXYAddress (eX, eY);
+ if (C == 8 || C == 10 || C == 127 || C == '!' || C == '"') // C == 13 (ENTER)?
+ {
+ if (C == 127)
+ {
+ eX -= 6;
+ if (eX < 0) eY = (eY ? eY - 1 : eY), eX = 77; //Možda i onemogućiti ovo!?
+ DISP.setXYAddress (eX, eY);
+ DISP.printChar (' ');
+ //eX -= 6;
+ }
+ else if (C == '!') // == 13
+ {eY = (eY + 1) % 5; DISP.setXYAddress (eX = 0, eY);} // (eX, eY);
+ else if (C == '"') DISP.refresh(), DISP.setXYAddress (eX = 0, eY = 0); //DISP.clear(), DISP.refresh(), DISP.setXYAddress (eX = 0, eY = 0);
+ }
+ else if (C > 31 && C < 126) // Ne može tildu (~) ispisati
+ {
+ if (eX >= 77) eX = 0, eY = (eY + 1) % 5; //Možda i onemogućiti ovaj WW!?
+ DISP.setXYAddress (eX, eY);
+ DISP.printChar (C);
+ eX += 6; //Provjeriti
+ }
+ }
+int main()
+ {
+ ENBL = 1;
+ DISP.init();
+ //T.attach (&DoIt, 0.05); //Regulirati 0.1, 0.2, 0.01
+ PC.attach (&DoIt);
+ while (7);
+ }
\ No newline at end of file
diff -r 000000000000 -r 4c2857ed48ec mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Mon May 05 07:44:35 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/8a40adfe8776 \ No newline at end of file