I have made a project that triggers a flashgun when a light barrier is broken or sound is registered depending on the sensor. The pot is added so i can tune the delay between the sensor being triggered and the flash firing.
All is working well except there is a obvious delay (from the photographs taken of a crossbow bolt hitting various items)and the flash firing. The LCD (16x2) is used to display the delay.
When I remove the LCD from the sketch all is well and I can capture excellent shots of crossbow bolt (200 at velocity of fps) and and a pellet (400 fps) hitting various items.
Question is, do I have to do without the LCD screen and just use the 'feel' of the pot position or is there a way of integrating the LCD without slowing down the speed between detection and firing of the flashgun. I am assuming the part of the sketch for the LCD is the problem.
Danksy:
is there a way of integrating the LCD without slowing down the speed between detection and firing of the flashgun.
of course there is.. first if you could indent your code properly and don't put more than 1 '}' on a line, it would greatly increase the readability (wow that actually is a word..)
Don't continuously write to the LCD ! create a separate function writing the delay and only call it if the delay-value has been altered. Do the same for the mode. Now your code should work more or less at the same speed it was without the LCD (only a change in the delay slows it down temporarily)