|
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]
|
|
|
|
|
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.
|
|
|
|
|
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.
|
|
|
|
|
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. 11111111111111111111 ____________________ <= empty unused boxes 22222222222222222222 ____________________ <= empty unused boxes
It also messed up when I added 33333333333333333333, I got this. 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.
|
|
|
|
|
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.
|
|
|
|
|