I'm brand new, so this may be a simple operator error. However, in trying to get my DigiSpark going, I tried making the following revision to the DigiSpark Start example.
The simple intent is to send two short 5v pulses, followed by a longer delay in order to trigger two CHDK enabled Canon cameras via USB remote while allowing ample time for the cameras to save and be ready for next photo based on the next pair of trigger pulses.
For example of intended application to aerial photo-mapping see:
http://publiclaboratory.org/notes/patcoyle/1-21-2013/balloon-mapping-meetup-saturday-11213-san-franciscoMy issue is that based on visual observation of the on-board LED, the delay at the end of the loop doesn't seem to vary even when I dramatically increase it as shown in the code. I had earlier tried 5 and 10 seconds, with no apparent difference.
I sure appreciate the help. Thanks, Pat
I tried this: CHDK_trgr_bsd_on_Start3
***
Just running plugged into USB hub (but had verified the DigiSpark Start sketch ran ok after unplugging from USB and powering with 9V battery)
Issue is that increasing final delay, or even putting in multiple lines does not seem to change the loop cycle. Here is the code.
// the setup routine runs once when you press reset:
void setup() {
// initialize the digital pin as an output.
// pinMode(0, OUTPUT); //LED on Model B
pinMode(1, OUTPUT); //LED on Model A (the model we have)
}
// the loop routine runs over and over again forever:
void loop() {
// intent is to trigger CHDK USB remote w pair of short on/off
// pulses followed by a longer delay, then repeat
// however, looking at LED, changing last line doesn't seem to vary delay
// turn the 5V and LED on (HIGH is the voltage level)
digitalWrite(1, HIGH);
delay(100); // wait for a 0.1 second
// digitalWrite(0, LOW); // turn the 5V and LED off by making the voltage LOW
digitalWrite(1, LOW);
// digitalWrite(0, HIGH); // for 2nd time turn the 5V and LED on (HIGH is the voltage level)
digitalWrite(1, HIGH);
delay(100); // wait for a 0.1 second
// digitalWrite(0, LOW); // turn the 5V and LED off by making the voltage LOW
digitalWrite(1, LOW);
delay(30000); // wait for 30 seconds between pairs of on/off pulses, then repeat
delay(30000); //extras for testing
delay(30000); //extras for testing
delay(30000); //extras for testing
delay(30000); //extras for testing
delay(30000); // wait for 30 seconds between pairs of on/off pulses, then repeat
delay(30000); //extras for testing
delay(30000); //extras for testing
delay(30000); //extras for testing
delay(30000); //extras for testing
delay(30000); // wait for 30 seconds between pairs of on/off pulses, then repeat
delay(30000); //extras for testing
delay(30000); //extras for testing
delay(30000); //extras for testing
delay(30000); //extras for testing
delay(30000); // wait for 30 seconds between pairs of on/off pulses, then repeat
delay(30000); //extras for testing
delay(30000); //extras for testing
delay(30000); //extras for testing
delay(30000); //extras for testing
}