Hi there, first of all I'm new to the Arduino world, I've been web developer for years but i decided to get an arduino for fun and to build a simple midi controller for my guitar's processor
With that in mind I purchased a mega board on Amazon, i went with a cheap board just to get an idea of how they work before i jumped into getting the real thing.
For starters since i'm familiar with c and c++, to refresh i wrote a quick library for the LCD that uses the LiquidCrystal library, just so i can print on the LCD with one line, nothing crazy just a simple library which works like a charm.
Then I figured I'd write a simple library to handle the buttons, well 2 libraries, one is for a Button object that just stores the pin and the last state and the other one which handles creating those buttons which works fine, i pass an array of pins and it works good using the Serial to monitor button presses
Then after that was done I jumped into using both the LCD and Buttons library together to monitor the button press on the LCD and that's where i'm having issues.
For some reason if i create more than 3 Button objects the LCD goes blank and the built in led starts flashing, 2 flashes per second or so, If I create 3 buttons then it works just fine. If i create 3 buttons and do Serial.begin with any baud rate then again the same thing happens, flashing built in led.
My guess is i'm running out of RAM? I'm not getting any compile errors, when i upload it the message says i'm using 2% for the Sketch and 1% of dynamic memory
My buttons library is bare bone, all it does is create multiple buttons and set the pinMode() for each the Button object only holds 2 ints the pin number and the last state and has a method that returns the pin number when called.
Any help would be appreciated, thanks!