EcoModder.com

EcoModder.com (https://ecomodder.com/forum/)
-   OpenGauge / MPGuino FE computer (https://ecomodder.com/forum/opengauge-mpguino-fe-computer.html)
-   -   RGB LCD for MPGuino (https://ecomodder.com/forum/showthread.php/rgb-lcd-mpguino-34624.html)

stoatmax 12-07-2016 02:10 AM

RGB LCD for MPGuino
 
Hi all,

long-time lurker, finally pulled the trigger and got all the components to make an MPGuino.

I'm using a freeduino board with an adafruit 16x2 RGB backlight negative LCD. While in the future I'd like to modify the code so I can change the colors using the buttons, right now I'm just trying to set it up to display orange.

This only requires red and green light (in theory) so I hooked up the red cathode to Pin 10 on the board, and the green cathode to 11, as I was under the impression from the adafruit documentation that the cathodes needed to be wired to PWM pins. Is this necessary to have the LCD display in a solid color, or is it just for when making the LCD change colors intermittently?

I added the following lines to my code:
under //LCD Pins:

#define RedPin 10
#define GreenPin 11
#define COMMON_ANODE

under void setup(void):

pinMode(RedPin,OUTPUT);
pinMode(GreenPin,OUTPUT);
setColor(83, 4);


at the bottom:

void setColor(int red, int green)
{
#ifdef COMMON_ANODE
red = 255 - red;
green = 255 - green;
#endif
analogWrite(RedPin, red);
analogWrite(GreenPin, green);
}


How's my code look? I haven't hooked up to the VSS, inj, or +12V yet, currently I'm testing it through USB power. The problem I'm experiencing is the screen flashes brighter about 2 times per second. Can anybody help me troubleshoot this issue?

Thanks :-)

Edit: For clarification, my board is using an ATMega328 chip, and I believe I'm using an old version of the MPGuino software, as the main download link is down. I used an old archived MPGuino.pde file from Github that's
dated June 2009, so I assume it's v0.82. If anybody has a link to where I could grab the v0.86 .pde file, I'd really appreciate it.

t vago 02-08-2017 09:48 AM

My version of MPGuino supports the Adafruit RGB LCD module, right out of the box.

You can find it here -> http://ecomodder.com/forum/showthrea...ued-34733.html


All times are GMT -4. The time now is 10:57 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Content Relevant URLs by vBSEO 3.5.2
All content copyright EcoModder.com