opening terminal window

davidwf

Senior Member
as simple as that ????? jees.... thank you
prsumably this goes right at the end of the program?

Is the above linked statement no longer correct then?
 

davidwf

Senior Member
The code runs on the SIM but after a few seconds fails saying "stack overflow - more gosuibs than returns" but I can't see why

When I download it, the terminal window now opens but nothing happens
 

Attachments

Buzby

Senior Member
Your 'lights off' sub calls the 'delay 10' sub, which then calls the 'lights off' sub, which then calls the 'delay 10' sub, which then calls the 'lights off' sub etc. etc.
 

davidwf

Senior Member
oops...it's still in the development stage.....and will be for some time by the looks of it :(

Thank you
 

Buzby

Senior Member
Also, if I preset c.1, c.5, c.6, c.7 to '1' to prevent all those calls, the sim stops with a warning that 'hi2cin' is being called before 'hi2csetup' has been called.

Is that because you have not posted the full code ?
 

davidwf

Senior Member
Your 'lights off' sub calls the 'delay 10' sub, which then calls the 'lights off' sub, which then calls the 'delay 10' sub, which then calls the 'lights off' sub etc. etc.
does it???.... I thought line 274 if pinc.1 = 0 then gosub lights_off would only action IF pin c.1=0.... but pin c.1 is high at thie time
 
Last edited:

davidwf

Senior Member
I am struggling with the full code as I am still trying to work out how to read & set the time using one of these http://www.ebay.co.uk/itm/DS3231-RTC-AT24C32-I2C-Precision-Real-Time-Clock-Memory-Module-Arduino-UK-FAST-/400857145439?hash=item5d54f2a05f:g:nuMAAOSwECZUqo8y
I don't need anything complicated, just to be able to set the time (hours & mins only) - I have made a start by defining the variables as you can see, ultimately I want to turn the lights off at a time set in line 315

I am also trying to upload the cct diagram but the uploader just sits there spinning
 

Buzby

Senior Member
does it???.... I thought line 274 if pinc.1 = 0 then gosub lights_off would only action IF pin c.1=0.... but pin c.1 is high at thie time
I ran it in the sim initially with all pins low, and it stopped on gosub overflow. Then I set the pins high, and it stopped with the hi2c error.

I'm sorry I can't spend more time on it at the moment, but I'm sure some forum member will have a bit more time.

Cheers,

Buzby
 

techElder

Well-known member
David, something with that many different subsections needs to be worked out section by section little by little.
 
Top