Loading...
  Show Posts
Pages: 1 ... 61 62 [63] 64 65 ... 106
931  Using Arduino / Project Guidance / Re: Home Alarm with a 3 wire 4x3 analog keypad nearly done but need some help please on: January 22, 2013, 09:21:56 am
That setup is not good to use. As liudr pointed out, that top right button will short out your arduino, possibly destroying it. You should rewire your keypad based on something like this.

[V+]---+---WWW--+---WWW--+---WWW--+---WWW--+---WWW--//+----[GND]
         |                |                |               |              |                   |
         |                |                |               |              |                   |
       ===(1)       ===(2)         ===(3)      ===(4)       ===(5)        //===(N)
         |                |                |               |              |                   |
         |                |                |               |              |                   |
         L------------L-----------L-----------L----------L--------//----L-------------[Arduino Pin]
932  Using Arduino / Project Guidance / Re: transistor switch logic . very hard to solve this scenario. on: January 22, 2013, 09:10:01 am
If your following the first link I gave you then, tip 41, should be fine. But looking at the data sheet, its made for high voltage applications. Kinda overkill for your project. You may just want to get some 2n3904 or 2n3906 NPN transistors from RadioShack, or simply a H-bridge DC Driver IC. 
933  Using Arduino / Programming Questions / Re: Programming LCD display for swtching between inputs on: January 22, 2013, 08:24:06 am
I don't see any problems other than some labeling issues, but it seems that you have the first part. Just do the same for the second, and add another button counter and last button state. Normally you would use arrays for multiple buttons, not saying you still cant, but using arrays will shorten the code and get rid of repetition. Also maybe the use of CASE statements for multiple items, instead of IF/ELSE statements.

Look into both.
934  Using Arduino / Project Guidance / Re: transistor switch logic . very hard to solve this scenario. on: January 21, 2013, 10:17:10 am
Your probably referring to this H bridge diagram, http://s.eeweb.com/members/von_wong/answers/1335122304-h-bridge.gif

Or possibly a simple H bridge chip, http://www.elektroda.pl/rtvforum/files-rtvforum/ckt_mtr_1826.jpg

935  Using Arduino / Programming Questions / Re: if pin 1 is high in 3seconds led will turn on else ignore .(if statement .help.) on: January 20, 2013, 11:33:27 pm
I was referring to the without delay method. That code is looking for a "constant" HIGH for 3 seconds. As I said before, you need to measure your pin, and set the IF statement accordingly. Analog high is 255, so if the pin is NOT 255 for 3 seconds, it won't trigger. So you need to set a value range so that it does trigger after 3 seconds.
936  Using Arduino / Programming Questions / Re: if pin 1 is high in 3seconds led will turn on else ignore .(if statement .help.) on: January 20, 2013, 10:46:55 pm
The reason it's not working is because analog gets values 0-255 and digital is 0 or 1. So as of right now your code is looking for a value of 255 to trigger. Your pin might not be putting out 255 but something like 168 or something. So you need to set a range to trigger the if statement to be true.

First you need to see what the value is, then set the IF statement to trigger at that value. It's the same in theory, but with a different setup. Instead of digital readings, it's analog.
937  Using Arduino / Programming Questions / Re: If statement doesn't work for me... on: January 20, 2013, 08:40:30 pm
No multi-posting!

What is the counter after the second print? Does it go past 160?
938  Using Arduino / Project Guidance / Re: Need some advice to build a drag racing tree on: January 19, 2013, 08:47:18 pm
I agree with PeterH, but instead of a switch, use two laser beams. One at  the start and one at the finish line. Then once the car leaves the first beam, it starts the timer and stops at the finish line. Then all you need to do is compute the time.
939  Using Arduino / Project Guidance / Re: Home Alarm with a 3 wire 4x3 analog keypad nearly done but need some help please on: January 19, 2013, 08:41:03 pm
Could you auto format your code please, "CTRL-T"
940  Using Arduino / Programming Questions / Re: Compiling error with IRremote on: January 19, 2013, 10:29:53 am
Could you put some spaces in the code, so it's not bunched up, and in the proper code tags "#"
941  Using Arduino / Displays / Re: I2C LCD .write issue on: January 17, 2013, 04:26:03 pm
Oh, so its normal, I thought it was a bug in the code. Ok then.
942  Using Arduino / Displays / I2C LCD .write issue on: January 17, 2013, 04:19:16 pm
I got an 20x4 I2C LCD and it is my first time using one, so I tried the Serial display example and at first it seemed to work fine until I entered more than 20 characters. I enter "1111111111111111111122222222222222222222" and I get this.

Quote
11111111111111111111
____________________ <= empty unused boxes
22222222222222222222
____________________ <= empty unused boxes

It also messed up when I added 33333333333333333333, I got this.
Quote
11111111111111111111
33333333333333333333
22222222222222222222
____________________ <= empty unused boxes

Why does lcd.write() do that?

And yes I did set it up correctly with the 20x4 compatible library.
lcd.begin(0x27,20,4); I also tried lcd.begin(0x27,16,2); to rule it out.
943  Using Arduino / Programming Questions / Re: lcd Begin & Ethernet.begin on: January 17, 2013, 03:52:13 pm
Have a look for yourself.
Quote
NB: Pins 10, 11, 12 and 13 are reserved for interfacing with the Ethernet module and should not be used otherwise. This reduces the number of available pins to 9, with 4 available as PWM outputs.

http://arduino.cc/en/Main/ArduinoBoardEthernet
944  Using Arduino / Programming Questions / Re: lcd Begin & Ethernet.begin on: January 17, 2013, 03:18:21 pm
With the ethernet shield on, your using all but pins 6 and 7.
10-13: Ethernet shield
9: LED
8: temperature sensor
6-7: open
2-5: LCD

You need to move 10-12 (LCD pins) somewhere else, but you only have 2 digital pins left. So either get rid of the LED on pin 9, or get a I2C LCD adapter.

You might be able to use the analog pins as well.
945  Using Arduino / Programming Questions / Re: lcd Begin & Ethernet.begin on: January 17, 2013, 03:10:13 pm
Ok so then the next question is, what pins does the ethernet shield use? If they use any of the same pins, you will have problems.
Pages: 1 ... 61 62 [63] 64 65 ... 106