Show Posts
Pages: 1 [2] 3 4 ... 293
16  Using Arduino / Project Guidance / Re: 20x4 LCD showing long text files via SD card on: September 15, 2014, 07:51:40 pm
Regardless of your overall approach you should be aware of the fact that you are going to have to do a bit of work with each group of 80 characters.

If you use the LiquidCrystal library that comes with the IDE, or any of the varients based on that library, you will have to deal with 20 characters at a time and reposition the cursor after each group of 20.

Otherwise if you send all 80 characters at once you will find that the first 20 are on line 1, the next 20 are on line 3, the next 20 are on line 2 and the last 20 are on line 4.  This is due to how the LCD controller works, not due to a flaw in the library. 

This can and has been corrected by software.  One example is a library that was primarily written to deal with 40x4 displays but which will work with 20x4 as well.  To get a copy start here:--> http://code.google.com/p/liquidcrystal440/ and follow the Downloads link to get to the latest version.

Then of course there is the problem of correctly hyphenating words that extend from one line to another....


Don
17  Using Arduino / Displays / Re: LCD - CustomCharacter:117: error: call of overloaded 'write(int)' is ambiguous on: September 15, 2014, 07:29:10 pm
Quote
why did u use the ""lcd.write((byte)0);""" instead of "lcd.write(0);"  

It's because of how the Arduino IDE deals with 'writing'.  The complete explanation can be found here:  http://forum.arduino.cc/index.php?topic=174883.msg1299547#msg1299547.

Scroll up a few posts (http://forum.arduino.cc/index.php?topic=174883.msg1298248#msg1298248) and I explain how you could have used:
Code:
lcd.write(8);
 

Don
18  Using Arduino / Project Guidance / Re: RF receiver, Pin output amperage? on: September 15, 2014, 07:06:13 pm
You could start by using Google to search for Arduino pin change interrupt.

Then, since you want to sense when your pin goes high you could look for a mode that triggers when the pin goes from low to high.


Don
19  Using Arduino / Displays / Re: LCD connection on: September 15, 2014, 09:12:44 am
Quote
Are they the PCB-mount tactile type?  If so, someone posted a tip about them a while - if you wire to opposite corners, you are guaranteed to not have a short.

That's a great idea for loose switches on a workbench or when designing a pc board.  It will also work if you can somehow mount the switch over the gap in the middle of a solderless breadboard (but I don't think they are large enough to bridge the gap).  If you mount them on either side of the gap they still have to be oriented properly.

Don
20  Using Arduino / Displays / Re: LCD connection on: September 15, 2014, 09:04:28 am
Quote
Why can I only see characters 0 -7 on the lcd on rows 0 and 1?  I have the LCD object defined as 16,2 but alas no luck seeing the characters after column 7.

This sounds like it may be a problem with the connections between the display and the pc board.  Do a search on this site for 'zebra' (I'm not kidding) to find some topics concerning this.

Quote
is it possible that I have it in 8 bit mode and only have the four data wires connected?? or would that just not show anything onscreen?

In this case you would see a single row of blocks on the screen.

It's not likely to be software related, but just in case you should try writing data to every memory location in the LCD controller.


Code:
#include <LiquidCrystal.h>

//LiquidCrystal lcd(rs,en,d4,d5,d6,d7);
  LiquidCrystal lcd(12, 11, 5, 4, 3, 2);       // put your pin numbers here

void setup()
  {
    lcd.begin(20, 4);                          // put your LCD parameters here
    for (char i=47; i<127; i++)                // send 80 consecutive displayable characters to the LCD
      {
        lcd.print(i);
        delay(100);                            // this delay allows you to observe the addressing sequence
      }
  }


void loop()
  { 
  }

Don
21  Using Arduino / Displays / Re: LCD connection on: September 14, 2014, 09:03:48 pm
Up some pictures of your hardware

Why didn't anyone else think of this ????

Don
22  Using Arduino / Displays / Re: LCD connection on: September 14, 2014, 02:13:01 pm
Quote
is there any reason why I cant just simply connect my LCD with the following connections?

Code:
RS - pin 4 (digital 2)
E - pin 6 (digital 4)

d4 - pin 11(digital 5)
d5 - pin 12(digital 6)
d6 - pin 13 ( digital 7)
d7 - pin 14 (digital 8)

And then define those pins in the code with the following line:

Code:
LiquidCrystal lcd(2,4,5,6,7,8);

This part is correct.  The tutorial doesn't explain how this works, it's buried here http://arduino.cc/en/Reference/LiquidCrystalConstructor.  By the way, do you see why the use of code tags is important to correctly present your code?

In order to have any chance at diagnosing your problem we need more information.  This would include not only a photo of your setup but the complete sketch as well.


Don
23  Using Arduino / Project Guidance / Re: RF receiver, Pin output amperage? on: September 14, 2014, 01:52:45 pm
Why are you setting the pin mode for one pin in setup and the other in loop?

You should probably be looking for a change in the receive pin level, not just the level itself.
This is also a job better handled by interrupts than by polling.


Don
24  Using Arduino / Displays / Re: My LCD does not display characters.. on: September 14, 2014, 01:45:12 pm
Quote
I followed your advice and still the same result.

You didn't follow the last paragraph of my advice.


Don
25  Using Arduino / Displays / Re: show message on lcd for certain amount of time before writing new message on: September 13, 2014, 11:33:22 pm
Quote
kinda like blink without delay but for lcds?

That is essentially the technique that you should use. 
- You will initially have the first message displayed.
- When the event happens you will display the new message and start counting milliseconds
- If the elapsed time is not up you will just continue doing whatever you should be doing
- If the elapsed time is up you will display the original message again and continue doing whatever you should be doing .


Don
26  Using Arduino / Displays / Re: My LCD does not display characters.. on: September 13, 2014, 11:18:40 pm
For less than 2 bucks.
. . .

For less than 2 bucks he may just exchange one set of problems for another.  Have you seen all the posts relating to getting I2C adapters to work?

Also - that board claims to do IIC/I2C/TWI/SPI.  Now the first three are all the same but does it really also do SPI?


Don
27  Using Arduino / Displays / Re: My LCD does not display characters.. on: September 13, 2014, 11:12:11 pm
Quote
I followed his instructions ...

He's a she.

Quote
and all it does was power up.

The Adafruit tutorials are generally pretty good so without seeing your code and a picture of what that code produces, along with a picture of your setup we can't determine what is wrong.

Here is my generic step by step approach that should work:

(1) If the module has a backlight then get it working properly.  This involves only pins 15 and 16 on most LCD modules.  Make sure to use a current limiting resistor if there is none on the LCD module.

(2) Get the power and contrast working properly.  This involves only pins 1, 2, and 3 on most LCD modules.  You should be able to just barely see blocks on one row of a two row display and on two rows of a four row display. 

NOTE:  The Arduino has not been used yet, except as a possible source for the power needed for the first two steps.  Do not try to go any further until this is working.  If you don't see the blocks then no amount of program code will help.

(3) Connect the LCD R/W pin (pin 5) to GND.

(4) Connect the six control and data wires between your LCD module and your Arduino.

(5) Upload your sketch and it should work.


Troubleshooting:

If you have a 16x1 display and there are blocks only on the left half of the row in step 2 then use lcd.begin(8, 2); in your sketch.

If you still don't get a display then make sure that your wiring matches the numbers in the descriptor (or vice versa).


Code:
//LiquidCrystal lcd(RS, E, D4, D5, D6, D7);
LiquidCrystal lcd(7, 8, 9, 10, 11, 12);      // put your pin numbers here

If you get a display but it is garbled or has some other problems then try again with a 'static' sketch, one that displays a simple message on the top row of the display and then stops.  All of your code should be in setup() and loop() should be empty between the brackets.

Code:
#include <LiquidCrystal.h>

//LiquidCrystal lcd(RS, E, D4, D5, D6, D7);
LiquidCrystal lcd(7, 8, 9, 10, 11, 12);      // put your pin numbers here

void setup()
  {
  lcd.begin(16, 2);                          // put your LCD parameters here
  lcd.print("hello, world!");
  lcd.setCursor(0,1);
  lcd.print("it works!");
  }

void loop()
  {
  }

If you are still having problems then we need to see a photograph of your setup that clearly and unambiguously shows all of the connections between your Arduino and your LCD module.  We also need a copy/paste version of the code that you are actually using, not a link to the code that you think you are using.

Don


28  Using Arduino / Displays / Re: WH1602B-TMI-ET# LCD on: September 12, 2014, 06:43:30 pm
The backlight is entirely independent of the display controller and will have no effect on whether the display works or not.  On the other hand, some displays, notably those with white characters on a blue background, are virtually impossible to see without the backlight (even if they are 'working').

The resistor can go in series with either the GND or the power lead so that wasn't your problem.  Most likely you had a bad connection somewhere else that got 'fixed' when you tinkered with the backlight wiring.


Don
29  Using Arduino / Project Guidance / Re: Accelerometer adaptation on: September 12, 2014, 05:35:25 pm
Well you gave him the answer that solved his problem - but he should have acknowledged that fact.

Don
30  Using Arduino / Project Guidance / Re: Servo agitating water? on: September 12, 2014, 03:04:14 pm
15" black & white I think. I was only 5 or 6 so I don't think I was reading model # labels yet...
We didn't have a TV when Howdy Doody was playing on TV.  I had to go to my friends house to watch it on their 7" set.  Then I went home, had supper, and went back to watch Captain Video.

Quote
Shouldn't that have been "what shape was the screen?"     (round?)
The tube was round but the bezel was masked off into a rectangle. 

Don
Pages: 1 [2] 3 4 ... 293