Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 14:26 17 Jul 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Micromite V4.7 Beta 2 *NEW*

     Page 3 of 4    
Author Message
OA47

Guru

Joined: 11/04/2012
Location: Australia
Posts: 982
Posted: 11:08pm 23 May 2015
Copy link to clipboard 
Print this post

Here is the code I am using and I am trying to shift the single digit hour across one space or specified character before the digit.
If Val(Left$(Time$,2)) < 12 Then
Text 5,1,Left$(Time$,2),LT,2,2,RGB(Cyan),RGB(Black)
Else
Hrs=Val(Left$(Time$,2))-12
Text 5,1,Str$(Hrs,2,0,"-"),LT,2,2,RGB(Cyan),RGB(Black)
EndIf


 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3285
Posted: 02:29am 24 May 2015
Copy link to clipboard 
Print this post

It should work Graeme.

I will have a look at it ASAP (I have a lot of things on at the moment).

Geoff
Geoff Graham - http://geoffg.net
 
paceman
Guru

Joined: 07/10/2011
Location: Australia
Posts: 1329
Posted: 03:29am 24 May 2015
Copy link to clipboard 
Print this post

Hi Graeme and Geoff,

I've just tried it and there does seem to be a problem with the STR$ function. STR$(hrs,2) only returns one character if its <10 hrs.

When I was using it with the Micromite 1, V4.5 and with the LCD command it was working correctly.

The following is a workaround:

hours = VAL(LEFT$(TIME$,2))
IF hours < 12 THEN
IF hours <10 THEN
Text 5,1,"0"+STR$(hours)+":",LT,2,2,RGB(Cyan),RGB(Black)
ELSE
Text 5,1,STR$(hours)+":",LT,2,2,RGB(Cyan),RGB(Black)
ENDIF
ELSE
hours = hours-12
IF hours <10 THEN
Text 5,1,"0"+STR$(hours)+":",LT,2,2,RGB(Cyan),RGB(Black)
ELSE
Text 5,1,STR$(hours)+":",LT,2,2,RGB(Cyan),RGB(Black)
ENDIF
ENDIF


You can replace "0" with " " of course if wanted.

GregEdited by paceman 2015-05-25
 
OA47

Guru

Joined: 11/04/2012
Location: Australia
Posts: 982
Posted: 12:14pm 24 May 2015
Copy link to clipboard 
Print this post

@Geoff, please don't take the report as a criticism or in need of urgent attention. I had written code to work around the issue and just thought I would bring it to your attention before a final release. I am very appreciative of all the work you have put in on these projects.

Thankyou again


@Greg , thankyou for confirming the issue and the offer of alternate code.

GM
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3285
Posted: 01:26pm 24 May 2015
Copy link to clipboard 
Print this post

No, not a problem. It is just that I always try to respond immediately to any bugs but in this case time is not on my side.

Geoff
Geoff Graham - http://geoffg.net
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3285
Posted: 01:47pm 24 May 2015
Copy link to clipboard 
Print this post

The answer has just dawned on me!!!!!

Font 2 does not have a space or a minus (-) character. So, when you specified either of these as the leading character MMBasic just skipped it as a non printable character.

If you had tried:
Text 5,1,Str$(Hrs,2,0,":"),LT,2,2,RGB(Cyan),RGB(Black)

it would have done what you expected because the colon (:) is in the character set.

It seems to me that the space and the minus (-) characters are more important in a numeric character set than the colon so that is something that needs to be changed.

Geoff
Geoff Graham - http://geoffg.net
 
paceman
Guru

Joined: 07/10/2011
Location: Australia
Posts: 1329
Posted: 04:06pm 24 May 2015
Copy link to clipboard 
Print this post

Amazing, you can miss these things by a whisker - if I'd have just put the colon into Graeme's original code instead of after I'd been checking it out then it would have shown up.

Glad it's you keeping track of this stuff Geoff and not me.

Greg
 
Zonker

Guru

Joined: 18/08/2012
Location: United States
Posts: 767
Posted: 09:02pm 24 May 2015
Copy link to clipboard 
Print this post

Morning Gents...

I finally got a chance to play with the new firmware... Nice..!

I went back to the TFT MM demo programs and converted a meter object to the 2.4 inch touch panel to play around with... Still working on it...



2015-05-25_070042_2-4_inch_meter_test.zip

 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10254
Posted: 09:53pm 24 May 2015
Copy link to clipboard 
Print this post

Zonker

Very nice demo - congrats

Peter
 
OA47

Guru

Joined: 11/04/2012
Location: Australia
Posts: 982
Posted: 11:58pm 24 May 2015
Copy link to clipboard 
Print this post

@Zonker

Looks Great

@Geoffg

  Quote  It seems to me that the space and the minus (-) characters are more important in a numeric character set than the colon so that is something that needs to be changed.

We need the colon as the delimiter for Time$

You have done the Bitmap command for other characters needed.

Thanks for the heads up on where I went wrong.

GM
 
paceman
Guru

Joined: 07/10/2011
Location: Australia
Posts: 1329
Posted: 01:35am 25 May 2015
Copy link to clipboard 
Print this post

Yes, nice job Zonker. I've got it running on a 2.8" with exactly the same code and connections and it looks great. It's amazing how much extra display area there is with the 2.8" screen - it's 7.8 sq" Vs 5.7 sq" and not much different current draw, about 50mA directly off the 3.3v supply.

Greg
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3285
Posted: 02:02am 25 May 2015
Copy link to clipboard 
Print this post

  Graeme Meager said  We need the colon as the delimiter for Time$

I have figured out a way to get the space, +, -, = and : in the font. So all is good.

They will be in the next beta.

Geoff
Geoff Graham - http://geoffg.net
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2437
Posted: 04:28am 25 May 2015
Copy link to clipboard 
Print this post

geoff: i presume storing the fonts (as bitmaps) is taking up a fair chunk of flash? i wonder if it would be practical to switch to storing the characters instead as a series of lines? or even as still bitmaps but in an external eeprom.

my 2.2" display is currently winging its way from china. i went for one WITHOUT a touch panel for better clarity. a few years back when trialing different displays in a product we found that the resistive touch panels of the day had a noticeable impact on brightness, clarity, as well as quickly falling victim to scuffing from dirty fingers and gloves.

it would be nice to think that in the not too distance future capacitive touch panels will start to filter down to the hobby market.

cheers,
rob :-)
 
twofingers

Guru

Joined: 02/06/2014
Location: Germany
Posts: 1579
Posted: 07:10am 25 May 2015
Copy link to clipboard 
Print this post

  Geoffg said   There has been a lot of comment on the loss of the SPI channel to the display/touch controller.

...

Geoff

hmm, seems the MM lost his SPI ability? (if you don't disable the LCDPANEL)
... I wanted to use the new LCD capability with a SPI thermocouple circuit (MAX31855). I got it already working with Peters Graphic library.


A display for my Reflow-(Pizza)-oven (3x SPI: LCD, Touch and MAX31855 thermocouple amplifier).

  Geoffg said  
  Graeme Meager said  We need the colon as the delimiter for Time$

I have figured out a way to get the space, +, -, = and : in the font. So all is good.

They will be in the next beta.

Geoff


Some countries (ie Germany) use the comma "," for numbers as decimal mark (1/4 = 0,25). Can we have it in the future, please?


Regards
Michael

/*
Demo code on 28 pinner (Micks Backpack 170).
OPTION LCDPANEL ILI9341,L,4,5,6
OPTION TOUCH 7,2
*/

@Zonker

good job! I like it!
(I thought it was my idea!) Edited by twofingers 2015-05-26
causality ≠ correlation ≠ coincidence
 
viscomjim
Guru

Joined: 08/01/2014
Location: United States
Posts: 925
Posted: 09:04am 26 May 2015
Copy link to clipboard 
Print this post

Hi Twofingers, are you saying that if you disable the lcd then you can do your spi temperature measurement and then re-enable the lcd and this will work?

Also, are you using a pid profile with your pizza oven? Just curious.

Thanks for all your help!
 
twofingers

Guru

Joined: 02/06/2014
Location: Germany
Posts: 1579
Posted: 09:56am 26 May 2015
Copy link to clipboard 
Print this post

  viscomjim said   Hi Twofingers, are you saying that if you disable the lcd then you can do your spi temperature measurement and then re-enable the lcd and this will work?

Hi Jim,

with Micromite V4.7 Beta 3 I can only use SPI with PeterMs Graphic library
(OPTION LCDPANEL disable, OPTION TOUCH disable).

  viscomjim said  Also, are you using a pid profile with your pizza oven? Just curious.


No, I don't use a pid profile. The oven runs at full power with manual power off. I think that's good enough. I use the Micromite only to observe the temperature.
But I'm prepared to control the SSR by MM. For that I have to isolate (fiberglass mat) the oven better.

To build up a oven control is a challenge, I think.



Today I encountered some issue with GUI CALIBRATE. I get always a calibration error regardless how exact I execute the calibration process. I can't use the Touch function. With PeterM's Graphic library there are never problems. Perhaps can someone help?

Regards
Michael

causality ≠ correlation ≠ coincidence
 
jman

Guru

Joined: 12/06/2011
Location: New Zealand
Posts: 711
Posted: 11:32am 26 May 2015
Copy link to clipboard 
Print this post

Hi

Graeme Meager was kind enough to share his code with me.
I added my NTP routine and the result is here.
Graphic Clock

I could not resist the boot screen :)

Regards
Jman


 
aargee
Senior Member

Joined: 21/08/2008
Location: Australia
Posts: 255
Posted: 02:26pm 26 May 2015
Copy link to clipboard 
Print this post

Hi Jman,
Do you have a link for that display?

Edit..

... ahh never mind. Found one.

Edited by aargee 2015-05-28
For crying out loud, all I wanted to do was flash this blasted LED.
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3285
Posted: 04:38pm 26 May 2015
Copy link to clipboard 
Print this post

  twofingers said  Today I encountered some issue with GUI CALIBRATE. I get always a calibration error regardless how exact I execute the calibration process. I can't use the Touch function.

If GUI CALIBRATE detects an error of more than 8 pixels it will issue a warning. But it is just a warning, you can still use touch.

After the warning use GUI TEST TOUCH to check the actual error, if it is not significant you can happily ignore the warning.

Geoff
Geoff Graham - http://geoffg.net
 
twofingers

Guru

Joined: 02/06/2014
Location: Germany
Posts: 1579
Posted: 02:19am 27 May 2015
Copy link to clipboard 
Print this post

Hi Geoff,

thanks for the quick response!

  Quote  If GUI CALIBRATE detects an error of more than 8 pixels it will issue a warning.


Thats useful!


  Quote  if it is not significant you can happily ignore the warning.


I tried it again with V4.7B8:


a. OPTION LCDPANEL ILI9341,L,4,5,6/OPTION TOUCH 7,2/GUI CALIBRATION/GUI TEST TOUCH
1. with calibration error I can't use the Touch function.

a. OPTION LCDPANEL disable, OPTION TOUCH disable
b. OPTION LCDPANEL ILI9341,L,4,5,6/OPTION TOUCH 7,2/GUI CALIBRATION/GUI TEST TOUCH
2. with successful calibration I was able to use the Touch function.

a. OPTION LCDPANEL disable, OPTION TOUCH disable
b. OPTION LCDPANEL ILI9341,L,4,5,6/OPTION TOUCH 7,2/GUI CALIBRATION/GUI TEST TOUCH
3. with calibration error I still can NOT use the Touch function.

a. OPTION LCDPANEL disable, OPTION TOUCH disable
b. OPTION LCDPANEL ILI9341,L,4,5,6/OPTION TOUCH 7,2/GUI CALIBRATION/GUI TEST TOUCH
4. with successful calibration I was able to use the Touch function.

Seems something is wrong (hopefully not ME! )

Michael
causality ≠ correlation ≠ coincidence
 
     Page 3 of 4    
Print this page
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025