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 3:6cdeb3b19afb, committed 2018-06-03
- Comitter:
- suntopbd
- Date:
- Sun Jun 03 01:47:20 2018 +0000
- Parent:
- 2:4e21ea1275a1
- Commit message:
- Fonts improved;
Changed in this revision
diff -r 4e21ea1275a1 -r 6cdeb3b19afb Char_Fonts.cpp
--- a/Char_Fonts.cpp Sun Jun 03 01:14:51 2018 +0000
+++ b/Char_Fonts.cpp Sun Jun 03 01:47:20 2018 +0000
@@ -13,6 +13,27 @@
#include "mbed.h"
#include "Char_Fonts.h"
+//SET Row Pins HERE //
+DigitalOut R1(PTC9);
+DigitalOut R2(PTC8);
+DigitalOut R3(PTC10);
+DigitalOut R4(PTC11);
+DigitalOut R5(PTA14);
+DigitalOut R6(PTC7);
+DigitalOut R7(PTA16);
+DigitalOut R8(PTA15);
+
+//SET Col Pins HERE //
+DigitalOut C1(PTD0);
+DigitalOut C2(PTC12);
+DigitalOut C3(PTB17);
+DigitalOut C4(PTB16);
+DigitalOut C5(PTA5);
+DigitalOut C6(PTA13);
+DigitalOut C7(PTA12);
+DigitalOut C8(PTA17);
+
+
Timer timer;
float speed= 0.0;
float gaptime = 0.0;
@@ -26,32 +47,13 @@
{
gaptime = zzz;
}
-// Row Pins //
-DigitalOut R1(PTC9);
-DigitalOut R2(PTC8);
-DigitalOut R3(PTC10);
-DigitalOut R4(PTC11);
-DigitalOut R5(PTA14);
-DigitalOut R6(PTC7);
-DigitalOut R7(PTA16);
-DigitalOut R8(PTA15);
-
-// Col Pins //
-DigitalOut C1(PTD0);
-DigitalOut C2(PTC12);
-DigitalOut C3(PTB17);
-DigitalOut C4(PTB16);
-DigitalOut C5(PTA5);
-DigitalOut C6(PTA13);
-DigitalOut C7(PTA12);
-DigitalOut C8(PTA17);
// 0 will glow LED and 1 will keep off //
// Use it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,1,1,1,1,
- 0,1,1,1,1,0,1,1,
- 0,1,1,1,1,0,1,1,
- 0,1,1,1,1,0,1,1,
- 0,1,1,1,1,0,1,1,
- 0,1,1,1,1,0,1,1,
- 0,1,1,1,1,0,1,1,
- 1,0,0,0,0,1,1,1,
+ 1,0,1,1,1,1,0,1,
+ 1,0,1,1,1,1,0,1,
+ 1,0,1,1,1,1,0,1,
+ 1,0,1,1,1,1,0,1,
+ 1,0,1,1,1,1,0,1,
+ 1,0,1,1,1,1,0,1,
+ 1,1,0,0,0,0,1,1,
};
@@ -390,13 +393,27 @@
int Zz[64] = {
1,1,1,1,1,1,1,1,
- 0,0,0,0,0,0,0,1,
+ 0,0,0,0,0,0,1,1,
1,1,1,1,1,0,1,1,
1,1,1,1,0,1,1,1,
1,1,1,0,1,1,1,1,
1,1,0,1,1,1,1,1,
1,0,1,1,1,1,1,1,
- 0,0,0,0,0,0,0,1,
+ 0,0,0,0,0,0,1,1,
+
+};
+
+
+int amark[64] = {
+
+ 1,1,1,1,1,1,1,1,
+ 1,1,1,0,0,1,1,1,
+ 1,1,1,0,0,1,1,1,
+ 1,1,1,0,0,1,1,1,
+ 1,1,1,0,0,1,1,1,
+ 1,1,1,0,0,1,1,1,
+ 1,1,1,1,1,1,1,1,
+ 1,1,1,0,0,1,1,1,
};
@@ -404,9 +421,7 @@
-
-
-///////////////// CHAR on MATRIX APIs //////////////////
+///////////////// CHAR on MATRIX APIs for EACH Character or Symble //////////////////
void A()
{
@@ -777,6 +792,19 @@
}
+void Amark()
+{
+ timer.start();
+ while (timer.read() < speed)// time of how long character will stay
+ {
+ dotpointer = &amark[0];
+ disp_page(dotpointer);
+ disp_off();
+ }
+ timer.reset();
+ gap_space(gaptime);
+}
+
void space()
{
diff -r 4e21ea1275a1 -r 6cdeb3b19afb Char_Fonts.h --- a/Char_Fonts.h Sun Jun 03 01:14:51 2018 +0000 +++ b/Char_Fonts.h Sun Jun 03 01:47:20 2018 +0000 @@ -28,10 +28,10 @@ void X(void); void Y(void); void Z(void); -void fstop(void); -void comma(void); -void qmark(void); -void amark(void); +void Fstop(void); +void Comma(void); +void Qmark(void); +void Amark(void); void space(void); void gap_space(float);
diff -r 4e21ea1275a1 -r 6cdeb3b19afb main.cpp
--- a/main.cpp Sun Jun 03 01:14:51 2018 +0000
+++ b/main.cpp Sun Jun 03 01:47:20 2018 +0000
@@ -12,13 +12,14 @@
{
disp_off();
- speed_down(0.5);
- gap_up(0.2);
+ speed_down(0.3);
+ gap_up(0.1);
while (1)
{
- // Prints M B E D on Dot Matrix //
+ // Prints A QUICK BROWN FOX JUMPED OVER THE LAZY DOGS ! //
+ space(); // show a blank display
A();space();
Q();U();I();C();K();space();
B();R();O();W();N();space();
@@ -29,6 +30,7 @@
L();A();Z();Y();space();
D();O();G();S();
space(); // show a blank display
+ Amark();
}