[SOLVED] Pass instantiated object to a different library?

EDIT: Liudr's existing BigFont library showed me the way. Stinking pointers. :stuck_out_tongue:

Sketch (TallFontExample.ino):

/*
=======================
TallFont Example Sketch
=======================
*/

#include <LiquidCrystal.h>
#include <TallFont.h>

LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

void setup() 
{
Serial.begin(38400);
lcd.begin(16,2);
initBigNumber(&lcd);
byte retval = showBigNumber(0);
Serial.println(retval);
}

void loop()
{
}

Header (TallFont.h):

/*
===============
TallFont Header
===============
*/

#ifndef TallFont_h
#define TallFont_h

#include <LiquidCrystal.h>

void initBigNumber(LiquidCrystal *l);
uint8_t showBigNumber(uint8_t arg);

#endif

Library (TallFont.cpp):

/*
================
TallFont Library
================
*/

#include "Arduino.h"
#include "LiquidCrystal.h"
#include "TallFont.h"

LiquidCrystal *output_lcd;

void initBigNumber(LiquidCrystal *l)
{
output_lcd=l;
}

byte showBigNumber(byte arg)
{
output_lcd->write("test");
return 1;
}

Stinking pointers. :stuck_out_tongue:

Pointers are great. It's people not understanding them that stinks.