Paid Gig: Push buttons to Activate Different Images from SD card on LCD project

I am not sure what this is worth for one of you to develop code to make this happen. But I am willing to spend up to $20 for someone to make me code to make this project work as intended. I will post the code publicly cause i really don't care for it to be a secret and the information could not be found on my own.

Here is a link to my thread and what i want done: http://forum.arduino.cc/index.php?topic=270118.msg1903927#msg1903927

I have the imagine files if needed or can provide the names of them for the code.

Hardware: 1x OLED Breakout Board - 16-bit Color 1.5" w/microSD holder https://learn.adafruit.com/adafruit-1-5-color-oled-breakout-board/overview

1x Arduino Uno R3 (Atmega328 - assembled) http://www.adafruit.com/product/50

I will pay thru paypal..

Yhanks, Eazy

How many push buttons?

initially i said 5.. but i say 6 now cause the unit has 6 analog inputs.

eazy2001x: Good Morning,

I need help with or would like someone to build this project for me. I am new to this and have no idea how to continue..

This is going inside my gauge cluster in my car and I need it to be clean/simple...

I need a LCD of many color or not that displays 5 icons when 12V is applied to pins.. each pin or combination of pins will display different icons on the screen.

Icon 1 when 12V is applied to pin 1 - Traction Control On Icon 2 when 12V is applied to pin 2 - Low Gas Icon 3 when 12V is applied to pin 3 - NOS Active Icon 4 when 12V is applied to pin 4 - Meth Active Icon 5 when 12V is applied to pin 5 - NOS and Meth Active

Priory.. If pin 1 has power and any other pin has power always display icon 1 If pin 2 has power and pin 1 is off display icon 2 If pin 3 has power and pin 1 is off , pin 4 is off, pin 5 is off display icon 3 If pin 4 has power and pin 1 is off , pin 3 is off, pin 5 is off display icon 4 If pin 5 has power and pin 1 is off , pin 3 is on, pin 4 is on display icon 5 If all pins are off then turn off display.

The display screen can be 2x2 inch, I can make the icons if given the resolution of the screen icon limits. I can even make animated Gifs if needed.

Thanks, Eazy

Image names: burn.bmp fuel.bmp nos.bmp meth.bmp nosmeth.bmp other.bmp

actual one small change.. when the unit boots up can you have it default to logo.bmp and when nothing else is active have it display that as well. Thank you..

Your description uses icon 1 through icon 5 and you give six bitmap names (seven if you include logo.bmp). It would help if you explicitly provided a mapping between icon number and bitmap filename.

void loop() {
    unsigned char buttons = 0;
    buttons |= digitalRead(pin1) << 1;
    buttons |= digitalRead(pin2) << 2;
    buttons |= digitalRead(pin3) << 3;
    buttons |= digitalRead(pin4) << 4;
    buttons |= digitalRead(pin5) << 5;

    // If all pins are LOW then turn off the display.
    if (buttons == 0) {  // No pins are HIGH
        // Turn off display
    } else
    if (buttons & (1<<1)) {  // Pin1 set
        // If pin 1 is HIGH  display icon 1
        // display icon 1
    } else
    if (buttons & (1<<2)) { // pin1 is LOW and pin2 is HIGH
        // If pin 2 is HIGH display icon 2
        // display icon 2
    } else
    if (buttons & 0b001000)  {  // Pin 3 only
         // If pin 3 is HIGH and pins 4 and 5 are LOW display icon 3
         // display icon 3
    } else
    if (buttons & 0b010000)  {  // Pin 4 only
         // If pin 4 is HIGH and pins 3 and 5 are LOW display icon 4
         // display icon 4
    } else
    if (buttons & 0b100000)  {  // Pin 5 only
         // If pin 5 is HIGH and pins 3 and 4 are LOW display icon 5
         // display icon 5
    } else {
        // Unexpected combination!  3&4 or 3&5 or 4&5
    }

sorry..

pin 1 - burn.bmp (Traction Active) pin 2 - fuel.bmp (Low Gas) pin 3 - nos.bmp (NOS Active) pin 4 - meth.bmp (Meth Active) pin 5 - nosmeth.bmp (NOS Meth Active) pin 6 - other.bmp (used at a later date)

Logo.bmp - Default start up image and active when no other pin is active.

does this help?

let me know if you need more info to complete the code? i need everything even the screen configuration so i can just load the files on the SD, add power and go.

How it should work
if nothing is active display the logo image on the screen
if the traction control is turned on it will display over anything else active
if the low fuel is on it will display over anything but traction control
if both traction control and low fuel are off the following can be displayed
if nos is active and meth is not active display the nos image on the screen
if meth is active and nos is not active display the meth image on the screen
if meth and nos are both active then display the nos and meth active icon on screen

Thought process with this code

  • Once the unit loads will initialize the screen and sd card then set the LCD black
  • With pins 1-6 low it will display logo.bmp
  • If pin1 is HIGH it will display the traction control image on the LCD (will display no matter what over all pins high or low)
  • If pin2 is HIGH and pin1 is LOW it will display the Low Fuel image on the LCD (Will display over pin3 and pin4-6 high or low)
  • If pin3 is HIGH and pin1 and pin2 are LOW it will display the other image on the LCD (will display if pin1 and pin2 are low)

NOTE: Pins 4-5 should be grouped. if pin1 or pin2 is HIGH it will still display over this group.

  • If pin4 is HIGH and pin1 and pin2 and Pin5 are LOW it will display NOS image on the LCD
  • If pin5 is HIGH and pin1 and pin2 and pin4 are LOW it will display Meth image on the LCD
  • If pin4 and pin5 are HIGH and pin1 and pin2 are LOW it will display NOS and meth image on the LCD

I am unsure if i can use pin 8 for the SC and it was just used in the example, if i cant ust it then please change it to a usable pin. I am also unsure about the Unexpected combinations now. Please address if needed.

possible code:

// this example looks for a file named "logo.bmp"
//  on the SD card, and renders it to the screen
#include <Esplora.h>
#include <SD.h>
#include <SPI.h>
#include <TFT.h>            // Arduino TFT library

#define SD_CS    8  // Chip select line for SD card in Esplora

PImage logo;

void setup() {
  // initialize the screen
  EsploraTFT.begin();
  // initialize the SD card
  SD.begin(SD_CS);
  // set the background the black
  EsploraTFT.background(0, 0, 0);

logo = EsploraTFT.loadImage("logo.bmp");
tractionActive = EsploraTFT.loadImage("burn.bmp");
lowGas = EsploraTFT.loadImage("fuel.bmp");
nosactive = EsploraTFT.loadImage("nos.bmp");
methactive = EsploraTFT.loadImage("meth.bmp");
nosmethActive = EsploraTFT.loadImage("nosmeth.bmp");
otheractive = EsploraTFT.loadImage("other.bmp");

void loop() {
    unsigned char buttons = 0;
    buttons |= digitalRead(pin1) << 1;
    buttons |= digitalRead(pin2) << 2;
    buttons |= digitalRead(pin3) << 3;
    buttons |= digitalRead(pin4) << 4;
    buttons |= digitalRead(pin5) << 5;

    // If all pins are LOW then turn off the display.
    if (buttons == 0) {  // No pins are HIGH
        // Load Logo
	logo;
    } else
    if (buttons & (1<<1)) {  // Pin1 set
        // If pin 1 is HIGH display craction control image
	tractionActive;
    } else
    if (buttons & (1<<2)) { // pin1 is LOW and pin2 is HIGH
        // If pin 2 is HIGH display Low fuel image
	lowGas;
    } else
    if (buttons & (1==0) & (2==0) & (3<<3)) { // pin1 and pin2 are LOW and pin3 is HIGH
         // If pin 6 is HIGH and pins 1 and 2 are LOW display Other image
	otheractive;
    } else {
    if (buttons & (4<<4) & (5==0) & (6==0))  {  // Pin4 only
         // If pin 4 is HIGH and pins 5 and 6 are LOW display Nos Active image
	nosactive;
    } else
    if (buttons & (5<<5) & (4==0) & (6==0))  {  // Pin5 only
         // If pin 5 is HIGH and pins 4 and 6 are LOW display Meth Active image
	methactive;
    } else
    if (buttons & (4<<4) & (5<<5) & (1==0) & (2==0))  {  // Pin4 and pin5 only
         // If pin4 and pin5 are HIGH and pins 1 and 2 are LOW display Meth and Nos Active image
	nosmethactive;
    } else
        // Unexpected combination!  ???
    }

Please help…