I have changed the Arduino code to give pulses of 40, 80 and 120 mSec as you suggested. I have tried running the code that you submitted again and I get a 'uBASIC:6 Unk stmt' error.
Hmmm .. this points to something I should have asked right away. What version & revision of CHDK are you using? Go to the CHDK
Miscellaneous Stuff menu and select
Show Build Info. Tell me what it says for
CHDK Ver: and
Revision ? It's always worth an using the most recent update if you are having strange problems.
Meanwhile, it appears that
@chdk_version is not backwards compatible to CHDK 1.3.0 uBASIC programs. It was supposed to be and it is in Lua. As zeno suggests, just delete that line.
Note : if you change the Arduino pulse widths you will need to update the code in the script of course.
I have checked in the CHDK settings that [Disable LCD Off] is set to 'Always' but the camera still turns off after a few seconds in review mode. If you think the camera is the reason that it shuts down in play mode then I will give up but if you think there is something that can be changed in the code then I will persevere.
Does the camera turn off using
my version of the script? And does it actually turn off or does the display go just go blank?
UPDATE : test script attached. It will create a file called LOG_0001.TXT located in the CHDK/LOGS folder on your SD card. Please run the test and post the result?