Code for AIDA64 External Display (Arduino) not working

I have copied (as best as I can), a project from a youtube video, where it adapts a protocol used by a display compatible with AIDA64 and converts it to instructions from my LCD.

There is no source provided in the video, but I unfortunately can’t figure out why my code isn’t working.

My Code –

#include <Wire.h> 
#include <LiquidCrystal_I2C.h>
#include <Arduino.h>

LiquidCrystal_I2C lcd(0x27,20,4);  // set the LCD address to 0x27 for a 16 chars and 2 line display

void blink(){
  digitalWrite(2, HIGH);
  digitalWrite(2, LOW);
}

void setup()
{
  lcd.init();                      // initialize the lcd 
  lcd.backlight();
  Serial.begin(9600);

  lcd.print("Ready>");
}

void loop()
{

  if (Serial.available()){
    //Serial.println(Serial.read());
    uint8_t c = Serial.read();

    if (c == 0xFE){
      while (Serial.available() == 0) {}
      uint8_t c2 = Serial.read();
      switch (c2) {
        case 0x47: // Set Cursor Pos
        {
          while (Serial.available() < 2) {}
          uint8_t c3 = Serial.read();
          uint8_t c4 = Serial.read();
          
          lcd.setCursor(c3, c4);
          break;
        }

        case 0x48: // Set Cursor Home
        {
          lcd.setCursor(0,0);
          break;
        }

        case 0x58: // Clear LCD
        {
          lcd.clear();
          break;
        }

        default:
        {
          lcd.print(c);
          lcd.print(c2);
          break;
        }
      }
    }
  }
}

Source youtube video – https://www.youtube.com/watch?v=Djeir8s-YMc

Hoping someone else might be able to help,

Cheers.

I have tried looking over the code, comparing to the video and trying to find more information, which I cannot unfortunatley

  • This is C++, not C.

    – 

  • Welcome to StackOverflow! Please take the tour to learn how this site works, and read “How to Ask”. Then come back and edit to add an actual question. For now you just made some statements, including “my code isn’t working“. Since we cannot use our crystal balls currently, we don’t know what you expect and what you get instead. — Oh, since this seems to be an Arduino specific issue, please consider to ask it over there. If you do, delete this post, as cross-posting is frowned upon.

    – 




Leave a Comment