Show Posts
Pages: 1 ... 60 61 [62] 63 64 ... 232
916  Using Arduino / Programming Questions / [SOLVED]Need help referencing two classes in one constructor. on: February 05, 2014, 06:13:38 pm
Hey guys, I'm hoping someone can point me in the right direction with a little issue i'm having. I am making a library that uses functions from the Print class, and LiquidCrystal_I2C class, but I can't seem to differentiate functions from the two. The problem is if I initialize my code to use Serial as opposed to Lcd, and comment out the function setCursor(), the sketch works. However and this is another issue i'm trying to work out, if I uncomment the setCursor function and leave it there, I get the error 'class Print' has no member named 'setCursor', which I know it doesn't because it belongs to the LiquidCrystal_I2C library.

My question is what would be the correct way to go about solving this problem, and how can I tell the code what functions to use based on the constructor "Serial / Lcd"?

Code:
class OnewireKeyPad{
Print & port_;
//LiquidCrystal_I2C & port_;
public:
   OnewireKeyPad (Print & port) : port_ (port) { }
            //OnewireKeyPad (LiquidCrystal_I2C & port) : port_ (port) { }

917  Using Arduino / Programming Questions / Re: Spill over to second line for text over 16 chars | 16x2 LCD Screen on: February 05, 2014, 01:24:46 pm
Related post HERE
918  Using Arduino / Project Guidance / Re: Need help with my keypad on: February 05, 2014, 12:41:51 pm
Show us a picture of your setup.
919  Using Arduino / Project Guidance / Re: Need help with my keypad on: February 05, 2014, 12:18:32 pm
Try using the keypad library.
920  Using Arduino / Project Guidance / Re: My 1st project: TIE Crawler from the Star Wars Expanded Universe on: February 05, 2014, 12:17:37 pm
Do you have a link?
921  Using Arduino / Project Guidance / Re: Need help with my keypad on: February 05, 2014, 10:49:37 am
What keypad do you have, can you provide a link?
922  Using Arduino / Project Guidance / Re: My 1st project: TIE Crawler from the Star Wars Expanded Universe on: February 05, 2014, 10:35:17 am
What tracks did you get? I won't know unless I see them. Are they lego treads?
923  Using Arduino / Project Guidance / Re: My 1st project: TIE Crawler from the Star Wars Expanded Universe on: February 05, 2014, 09:33:54 am
It does but it takes a very long time. A lot longer than steel or iron does.
924  Using Arduino / Project Guidance / Re: Need help in Codes for Arduino and RADius-S v1.1 on: February 05, 2014, 07:58:42 am
I would have you swap the codes but you already removed the RX pin on one of the modules.
925  Using Arduino / Project Guidance / Re: My 1st project: TIE Crawler from the Star Wars Expanded Universe on: February 05, 2014, 07:56:23 am
No, air slits should be enough, but you should always test your components first before the final installation.
926  Using Arduino / Project Guidance / Re: Need help in Codes for Arduino and RADius-S v1.1 on: February 04, 2014, 11:36:17 pm
You need a software serial example and combine it with a normal serial example. Actually the software serial example already has everything done for you.
927  Using Arduino / Programming Questions / Re: number to character array on: February 04, 2014, 11:33:53 pm
Try dtostrf().
928  Using Arduino / Programming Questions / Re: If else you else my if else question. If else question on: February 04, 2014, 11:31:07 pm
uS is time, not a distance, so why are you comparing uS to your distance?
if(uS > 100) ??? You may want to convert uS first then compare it.
929  Using Arduino / Project Guidance / Re: Need help in Codes for Arduino and RADius-S v1.1 on: February 04, 2014, 11:06:37 pm
Upload with module off, then put module back on.
930  Using Arduino / LEDs and Multiplexing / Re: Analog LED strips To digital Control on: February 04, 2014, 11:01:03 pm
You could use demultiplexers and maybe shift registers. Will you be dimming the strips too?
Pages: 1 ... 60 61 [62] 63 64 ... 232