Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 18:21 19 May 2024 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 : SuperClock.bas

Author Message
Sreckovuka
Newbie

Joined: 03/06/2017
Location: Australia
Posts: 2
Posted: 02:12pm 03 Jun 2017
Copy link to clipboard 
Print this post

Gents
anyone interested in making some modification to the super clock.bas
I happing to pay for the time and labour. or give me a Price.
all i need is to add a new menu and a on off time to control a relay
if interested please call me on 0466537205. (Australia)

regards
srecko Vuka



 
palcal

Guru

Joined: 12/10/2011
Location: Australia
Posts: 1805
Posted: 08:23pm 03 Jun 2017
Copy link to clipboard 
Print this post

I don't think what you ask would be too difficult, but when I run the code as is, I get an error message

[425] Text MM.HRes/2, 172, "Setting date and time will also adjust",C ,1 ,1 , c.entry
Error: Array dimensions

c.entry is a constant for RGB(Yellow)
I can't see anything wrong.
Paul.

"It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"
 
Sreckovuka
Newbie

Joined: 03/06/2017
Location: Australia
Posts: 2
Posted: 09:30pm 03 Jun 2017
Copy link to clipboard 
Print this post

is the just on the unmodified super clock.bas?
 
palcal

Guru

Joined: 12/10/2011
Location: Australia
Posts: 1805
Posted: 09:53pm 03 Jun 2017
Copy link to clipboard 
Print this post

I'm using the code from Geoff's web site, no modifications.
Paul.
"It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3167
Posted: 03:19am 04 Jun 2017
Copy link to clipboard 
Print this post

I don't know what you are doing Paul but I just checked it and it works fine.

I used a 28-pin Micromite V5.04.04 loaded with SuperClockFontsV2.bas and SuperClockV2.bas from my website.

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

Guru

Joined: 12/10/2011
Location: Australia
Posts: 1805
Posted: 11:05am 04 Jun 2017
Copy link to clipboard 
Print this post

I'm using a 170 Backpack with MM V5.04.01. I had another clock running on it OK.
I will reload the code and see what happens.
Paul.

edit. The article says you can use one of 3 sources for the time, so I don't have an RTC or GPS connected, just using the internal oscillator.
Edited by palcal 2017-06-05
"It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"
 
Phil23
Guru

Joined: 27/03/2016
Location: Australia
Posts: 1664
Posted: 11:41am 04 Jun 2017
Copy link to clipboard 
Print this post

Very interesting thought; changing the Super Clock....

I'm so over Plug in timers & their inconsistent menu's.

I've played with the Super Clock in the past, but had no real use for it.

But with all those spare I/O pins; plenty of relay outputs...
Even the possibility for using a few as inputs as well;

So those garden sprinklers don't run when it's raining....

Phil

 
palcal

Guru

Joined: 12/10/2011
Location: Australia
Posts: 1805
Posted: 12:21pm 04 Jun 2017
Copy link to clipboard 
Print this post

OK I started from scratch and re flashed the chip with V5.04.01 loaded and saved the font, loaded the clock file and the same as before. I grabbed another identical Backpack did the same thing and the same error. So I re flashed with V5.04.04. Now I get a different error. I get to the stage of entering the time and date, but as soon as I touch any number I get the error.
  Quote  [649] str = Left$(str, digit-1) + SCap(b) + Mid$(str, digit+1, 9)
Error: 0 is invalid (valid is 1 to 255)

It always happens to me.
Paul.
"It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"
 
palcal

Guru

Joined: 12/10/2011
Location: Australia
Posts: 1805
Posted: 01:35pm 04 Jun 2017
Copy link to clipboard 
Print this post

Connected a GPS and the clock works OK. Set to SYDNEY (EST) time which is the correct zone for me but tried to change SYDNEY to TOWNSVILLE. When I try to delete SYDNEY I get back to the 'S' and it throws the error
  Quote  [770] str = Left$(str, Len(str) - 1)
Error: 0 is invalid (valid is 1 to 255)

and won't delete the 'S'.
Paul.
"It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3167
Posted: 04:50pm 04 Jun 2017
Copy link to clipboard 
Print this post

Ah, damn. You have found a bug in MMBasic V5.04.04. The Left$() function will not allow zero characters to be selected.

This is an updated version of SuperClock.bas which works around that issue: 2017-06-05_031115_Super_Clock_BASIC_Program.zip

BTW The workaround for the Left$() bug is to use the MID$() function.
Ie, instead of s$ = Left$(st$, 0) use s$ = Mid$(st$, 1, 0)

  palcal said  It always happens to me.

Don't worry, it has to be someone (and thanks for finding the bug).

GeoffEdited by Geoffg 2017-06-06
Geoff Graham - http://geoffg.net
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024