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 MIP8F_SPI_Ver50
Revision 10:733bfa7cf111, committed 2018-11-19
- Comitter:
- JDI_Mbed_Team
- Date:
- Mon Nov 19 04:45:11 2018 +0000
- Parent:
- 9:0550432c22b5
- Commit message:
- renewal sample code, SpeedMeter demo
Changed in this revision
--- a/MIP8F_SPI.lib Wed Oct 31 02:18:53 2018 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -https://os.mbed.com/teams/JapanDisplayInc/code/MIP8F_SPI_Ver30/#944f2968c19f
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MIP8F_SPI_Ver50.lib Mon Nov 19 04:45:11 2018 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/teams/JapanDisplayInc/code/MIP8F_SPI_Ver50/#8cc8e00fed46
--- a/main.cpp Wed Oct 31 02:18:53 2018 +0000
+++ b/main.cpp Mon Nov 19 04:45:11 2018 +0000
@@ -1,6 +1,6 @@
/**
* @file main.cpp
-* @brief Ver3.0 Sample source code for MIP8 diplay.
+* @brief Ver6.0 Sample source code for MIP8 diplay.
* @details
*
* Ver3.0 Addtional function is font display. this demo code is tha degit is counted up like a meter panel
@@ -106,7 +106,7 @@
fscanf(fp, "%d",&width); //width read
fscanf(fp, "%d",&height); //height read
fscanf(fp, "%d",&blctrl_sel);//blct_sel read //0:40mA, 1:160mA
- sprintf(filepath,"/sd/%dx%d",width,height); //DispAllDir("/sd/180x180") //file name write to filepath
+ sprintf(filepath,"/sd/SpeedMeter2-%dx%d",width,height); //DispAllDir("/sd/180x180") //file name write to filepath
fclose(fp);
} else {
FILE *fp = fopen("/sd/settings.txt", "rb"); //read binary
@@ -149,15 +149,14 @@
//DIR *d;
+ filenum = CntFile(filepath); //file number read
+ ReadBmp(filepath,0);
while(1)
{ //BITMAPS
- filenum = CntFile(filepath); //file number read
for(uint32_t i=0; i<filenum; i++)
{
for( int j = 0; j < 2; j++)
{
- ReadBmp(filepath,0);
-
while(HaltSW.State()) { // VCOM invert when image is still
// pol++;
// WD.command( (pol << 6) & 0x40 );
@@ -166,12 +165,21 @@
HaltSW.Clear();
//1bit trasfer mode = monochro diplay
- if( j%2 == 0 && bmp_bitcount != 8)
- WD.writeDISP(TrBIT4);
- else
- WD.writeDISP(TrBIT1);
+ //if( j%2 == 0 && bmp_bitcount != 8)
+ WD.writeDISP(TrBIT3);
+ //else
+ // WD.writeDISP(TrBIT1);
//wait(2);
+
+ sprintf(KMPH,"km/h");
+ WD.set_ActualFontWidth();
+ WD.set_font((unsigned char*) Arial28x28);
+ WD.foreground(0x0e);
+ WD.background(0x00);
+ WD.obliqueout(290,200,KMPH);
+
+
if( j%2 == 0 )
{
// for color diaplay
@@ -183,26 +191,20 @@
WD.background(0x00);
}
//WD.fillrect(0,115,399,205, WD.get_Background() );
-
- sprintf(KMPH,"km/h");
- WD.set_ActualFontWidth();
- WD.set_font((unsigned char*) Arial28x28);
- WD.obliqueout(70+200+35,100+20+49,KMPH);
-
WD.set_font((unsigned char*) Arial94x94);
WD.set_FixedFontWidth(50);
for(int t=0;t<100;t++)
{
sprintf(countup,"%2d",t);
- WD.obliqueout(70+35+48,100+20,countup);
+ WD.obliqueout(130,150,countup);
//1bit trasfer mode = monochro diplay
if( j%2 == 0 /*&& bmp_bitcount != 8*/)
// for color display
- WD.writeDISP(100+20,190+20,TrBIT4);
+ WD.writeDISP(150,225,TrBIT3);
else
// for color diaplay
- WD.writeDISP(100+20,190+20,TrBIT1);
+ WD.writeDISP(150,225,TrBIT1);
if( j%2 == 0 && t==60)
{