Show Posts
Pages: [1] 2 3
1  Using Arduino / Project Guidance / Re: Volt Meter Clock on: February 02, 2011, 12:39:53 am
the way you did the code will make the minute and hour meters move in discrete  steps, rather than smoothly move from one number to the other.  Also you should be able to do all of the calculations with only integers.  Let me know if you need any more help.  I have my own arduino powered meter clock on my front table. (check out Make vol 13)
2  Forum 2005-2010 (read only) / Bugs & Suggestions / Re: Addition of sprintf() function in reference page on: November 29, 2010, 08:22:13 pm
do keep in mind that there is a difference between the c/c++ language and the libraries that traditionally come with it.  
3  Forum 2005-2010 (read only) / Bugs & Suggestions / Re: LCD Library on: May 15, 2008, 10:15:23 pm
no, this is for paralele interfaced LCD's with the hitachi chipset.  
4  Forum 2005-2010 (read only) / Bugs & Suggestions / Re: LCD Library on: April 30, 2008, 12:33:52 am
I have the println() methods working now.  The new version is at http://www.gradbert.org/lcdnew.zip
5  Forum 2005-2010 (read only) / Bugs & Suggestions / Re: LCD Library on: April 29, 2008, 11:48:47 pm
Here is a pic of an arduino driving two lcd's at once using the lcd library i have been playing with


(the small circuit board on the protoboard is a 3 axis accelerometer, for another project)
6  Forum 2005-2010 (read only) / Bugs & Suggestions / Re: LCD Library on: April 29, 2008, 11:00:21 am
Quote
gradbert: cool.  I actually did something similar (see: http://svn.berlios.de/wsvn/arduino/trunk/hardware/cores/arduino/), but you've got some nice improvements.  I like the name Printable better than Print, which is what I used.  Also, did you get this to work on the Arduino?  I had trouble getting virtual functions to compile, so I hacked together my own version.  


I did get it working.  In the zip file is an example program that will compile, download, and display on an lcd.  The only thing that was really giving me a problem was that the build doesn't seem to be very happy with a library including another library, so in my sketch I have to explicitly include <Printable.h>.

Now because the pin assignments are local to the instance of the object, I should be able to hook up two lcd displays at once.  If I have some time this week, I will make a second lcd cable and try it.
7  Forum 2005-2010 (read only) / Bugs & Suggestions / Re: LCD Library on: April 29, 2008, 10:38:24 am
Quote
hi gradbert, I am looking forward to trying your LCD library but your site is not responding.

I should be more careful posting late at night.  The correct url is http://www.gradbert.org/lcdnew.zip
8  Forum 2005-2010 (read only) / Bugs & Suggestions / Re: LCD Library on: April 29, 2008, 12:23:06 am
Ok, I figured code speaks louder than words, so I took the LCD4bit library and combined it with the code from SoftwareSerial.  The constructor it the interface described previously.  It has the most of the same print() and println() functions as SoftwareSerial.  The print(uint8_t) is replaced with rprint(uint8_t).  something with the casting was giving me grief.  All the printing functions have been moved to a class called Printable.  the LCDnew class only has to implement rprint().  I don't have the carrage return/line feed handling implemented in the LCD class yet.

check it out at http://www.gradbert.org/ldcnew.zip

I still need to do some work on this but I figure some early feedback would be good
9  Forum 2005-2010 (read only) / Bugs & Suggestions / Re: LCD Library on: April 28, 2008, 03:32:08 pm
Quote
I'm planning to include a LiquidCrystal library in Arduino 0012.  It will support both 4 and 8 bit modes (though is there any reason you'd want to use the 8-bit one?).  The API mirrors the Wiring one (http://wiring.org.co/learning/libraries/LiquidCrystal/index.html) - using the same print() and println() functions as the Serial class.  The code is at: http://svn.berlios.de/wsvn/arduino/trunk/hardware/libraries/LiquidCrystal/#_trunk_hardware_libraries_LiquidCrystal_


The interface for the wiring lcd library is not as friendly as I would hope for the arduino.  The init routine doesn't allow for fine enough control of the location of the data pins, and it does not have any way to set the number of lines on the display.    Also it doesn't have any way to send arbitrary control codes (or any high level interface to the functions on the LCD)  

I would think that the interface could look somewhat like this:

class LCD {
  LCD(int numLines, int ePin, int rwPin, int rsPin, int d4Pin, int d5Pin, int d6Pin, int d7Pin);
  LCD(int numLines, int ePin, int rwPin, int rsPin, int d0Pin, int d1Pin, int d2Pin, int d3Pin, int d4Pin, int d5Pin, int d6Pin, int d7Pin);
  init();
  clear();
  enable();
  disable()
  cursorMode(int mode);
  cursorTo(int row, int column);
  commandWrite(int value);

  // print() and println() functions as in serial

}

notice that which constructor you use will set either 4bit or 8bit mode

Another thing that we could do would be to make Serial, SoftwareSerial and LCD all inherit from a common base class.  That way all the number printing routines and such would only have to be implemented once.  This might cost space if only one of the 3 was used, but we might wave space when using 2 or more.

10  Forum 2005-2010 (read only) / Bugs & Suggestions / Re: LCD Library on: April 25, 2008, 11:59:57 am
what would happen then if I have a 2 line lcd and i did
LCD.println("A");
LCD.println("B");
LCD.println("C");

would the last line roll off and lcd  showing

A
B

or would it scroll up showing

B
C

or would it wrap around to the top showing

C
B

11  Forum 2005-2010 (read only) / Bugs & Suggestions / Re: LCD Library on: April 24, 2008, 11:00:29 pm
I agree too that it should be changed, but not to println().  the Serial.println() function sends a line break after the text, so that the next thing sent will show up on the next line.  This is not the way the LCD.printIn() function works.  It leaves the cursor on the same line.  It works the same way as Serial.print().  So lets change it instead to LCD.print()
12  Forum 2005-2010 (read only) / Troubleshooting / Re: amps on: November 22, 2009, 12:48:11 pm
When I was looking to see if my arduino powered clock could run off batteries, i measured it in the 20-30 mA range.  And that was a decimillia and 3x 1 mA meters.  
13  Forum 2005-2010 (read only) / Troubleshooting / Re: NOISE on: November 01, 2009, 01:54:10 am
I have an accelerometer  that runs on 3.3v.  The voltage regulator I was using was generating a very small amount of noise.  So small that I needed to use an oscilloscope to see it.  But the noise in the power supply was causing noticable noise in the reading from the accelerometer.  flitering the power with a capacitor fixed the issue
14  Forum 2005-2010 (read only) / Development / Re: ZIFduino on: March 31, 2008, 07:20:27 pm
Quote
It's set up so you can use either a crystal or an oscillator.  A lot of people don't care either way, but a lot of people do.  I figure it's better to give the option.

Good idea, the resonators are typically +- 5% of the desired frequency.  If you are doing something like building a clock a 5%  error would mean your clock would gain or lose over an hour a day.  Or if you are generating a tone, it could be off by almost  a 1/2 step.


15  Forum 2005-2010 (read only) / Development / Re: Crystal uses (compared to ceramic resonators) on: July 05, 2008, 10:55:31 pm
Quote
In my opinion, a crystal is only useful if you want to have an extremely accurate real-time clock.  A resonator is more than adequate for most general timing purposes as its accuracy is typically something like 0.2 - 0.5%.

- Ben


One thing to consider with using a crystal versus a resonator for timing is how long you are going to be keeping time.  There are 10080 minutes in a week.   If your resonator is off by 0.5% (worst case) your clock will be off by 50 minutes.  where as a crystal at worse case (0.05%) will only be off by 5 minutes.   So if I need a timer for cooking an egg, the resonator is fine, but when I come back from a week's vacation, i could tolerate my arduino based alarm clock going off 5 minutes late, but not 50 minutes late.

Look at what you are wanting to do figure out what will work.  
Pages: [1] 2 3