Arduino Module Programming?
#31
I think I've figured out why it doesn't work. While pulling to ground, I always checked if the new value is at least 10 ADC units greater than the old value. But on your schematic, if you press a button, the ADC value drops below 1000 to a new value, say 100, the code doesn't catch it and if you hold the button and press another one, the value will jump to over 100 ADC units and it will be caught by the code.
Check this program, it should work ok now, I have not tested it, only going based on what you told me. If it still is iffy, just use the previous version with a different condition, ie. if (prev_input - curr_input > 10)
Check this program, it should work ok now, I have not tested it, only going based on what you told me. If it still is iffy, just use the previous version with a different condition, ie. if (prev_input - curr_input > 10)
#33
Thread
Thread Starter
Forum
Replies
Last Post
D K
Ford Powerstroke 99-03 7.3L
0
05-17-2015 11:27 AM