Go Back   EcoModder Forum > EcoModding > Instrumentation > OpenGauge / MPGuino FE computer
Register Now
 Register Now
 

Reply  Post New Thread
 
Submit Tools LinkBack Thread Tools
Old 12-07-2016, 02:10 AM   #1 (permalink)
EcoModding Lurker
 
Join Date: Dec 2016
Location: ny
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Exclamation 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.


Last edited by stoatmax; 12-07-2016 at 06:42 AM.. Reason: Just for kicks
  Reply With Quote
Alt Today
Popular topics

Other popular topics in this forum...

   
Old 02-08-2017, 09:48 AM   #2 (permalink)
MPGuino Supporter
 
t vago's Avatar
 
Join Date: Oct 2010
Location: Hungary
Posts: 1,807

iNXS - '10 Opel Zafira 111 Anniversary

Suzi - '02 Suzuki Swift GL
Thanks: 828
Thanked 706 Times in 455 Posts
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

  Reply With Quote
Reply  Post New Thread


Tags
code, lcd, mpguino, rgb, troubleshooting

Thread Tools




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