Diesel Bombers

Diesel Bombers (https://www.dieselbombers.com/)
-   Audio Equipment/Electrical (https://www.dieselbombers.com/audio-equipment-electrical/)
-   -   Arduino Module Programming? (https://www.dieselbombers.com/audio-equipment-electrical/92996-arduino-module-programming.html)

AdrianD 05-29-2012 01:29 AM

1 Attachment(s)
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)

2004LB7 05-29-2012 01:39 AM

thanks, i will give it a shot.

one thing i discovered is that the relay board i am using requires that the "on" pins be pulled to ground to activate the relays. i guess that means in the programming the pins used on the Arduino board will need to go low or "grounded" when on

AdrianD 05-29-2012 02:39 AM

Test it and let me know :)

The pins can be set to active low or active high but you will need something to be able to drive the relays, the chip cannot drive a relay.


All times are GMT -5. The time now is 12:09 AM.


© 2024 MH Sub I, LLC dba Internet Brands