Audio Equipment/Electrical Discussions Based on Automotive Stereo Equipment Such As Amps , Head Units & Speakers Including Installation and System Set Up Information. Electrical or wiring issues on anything that requires wiring.

Arduino Module Programming?

  #31  
Old 05-29-2012, 01:29 AM
AdrianD's Avatar
Diesel Enthusiast
Join Date: Aug 2010
Location: Transylvania
Posts: 98
Received 10 Likes on 9 Posts
Default

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)
 
Attached Files
File Type: txt
check_button_value.txt (434 Bytes, 63 views)
  #32  
Old 05-29-2012, 01:39 AM
2004LB7's Avatar
Diesel Bomber
Thread Starter
Join Date: Dec 2010
Location: Fool's Golden State
Posts: 1,190
Likes: 0
Received 113 Likes on 109 Posts
Default

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
 
  #33  
Old 05-29-2012, 02:39 AM
AdrianD's Avatar
Diesel Enthusiast
Join Date: Aug 2010
Location: Transylvania
Posts: 98
Received 10 Likes on 9 Posts
Default

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.
 
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
D K
Ford Powerstroke 99-03 7.3L
0
05-17-2015 11:27 AM
chris_fininzio
Ford 83-94 6.9 and 7.3L General
0
12-17-2014 10:50 AM


Thread Tools
Search this Thread
Quick Reply: Arduino Module Programming?



All times are GMT -5. The time now is 12:18 PM.