LabVIEW Interface for Arduino Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Sketch too big?

I am trying to use LIFA with my older Arduino which has an ATmega168.  When I try to upload or verify the LVIFA_Base sketch it gives me an error stating that the sketch is too big (19738 bytes, the 168 only has 14336 available).

I'm wondering if I have the compiler optomization set wrong, or possibly I'm using a boot loader that is taking up too much room?

Any ideas on what I can do?

0 Kudos
Message 1 of 3
(3,293 Views)

LIFA is not supported on boards with the ATmega168 (for this very reason).

Try commenting the following lines in LabVIEWInterface.h

// #define STEPPER_SUPPORT 1         // Defines Whether The Stepper Library Is Included - Comment This Line To Exclude Stepper Support

and then in LabVIEWInterface Comment

// #include <LiquidCrystal.h>

// LiquidCrystal lcd(0,0,0,0,0,0,0);

Everything between

/*********************************************************************************

**                                      LCD

*********************************************************************************/ 

/*********************************************************************************

** Continuous Aquisition

*********************************************************************************/   

And the entire fucntion

void lcd_print(unsigned char command[])

This will disable Stepper and Character LCD support (The VIs will still exist but will not work with this firmware).  The resulting code should be 13618 bytes.

It may be easier to get an Uno.

Good Luck!

-Sam K

0 Kudos
Message 2 of 3
(2,718 Views)

Thanks Sammy, that is EXACTLY what I needed!  I've got it hooked up and displaying a bar graph from an analog input.  Hopefully other folks will be able to pull the same trick.

Maybe future versions could be made sort of al la cart using #defines or whatever.

I don't think I'll miss the LCD library, but I'm sure I could make use of the stepper code some time (or I could just bit bang it in LV, I've done it before).

0 Kudos
Message 3 of 3
(2,718 Views)