Go Down

Topic: Output a message from an SQL result on LCD 2004 (Read 195 times) previous topic - next topic

adicody

Hello,
I am trying to fiind the best way to connect  an arduino Uno Board with an LCD 2004A using an I2C connection with an SQL server in a way that i have to show daily a value from a query in sql

To be more precise I have to show on an 2004A LCD Display a value such as "Yesterday results - 1000 " which is the result of an SQL querry . The value it should be updated daily.
The arduino it is conneced via USB with the computer that has the SQL client on it.
So the question is How can I interface the Arduino Uno via USB with a SQL server.

Thank you very much and I hope with this maybe stupid question I am not offending the policy of the community.

#include <Wire.h>
#include <LiquidCrystal_I2C.h>
//I2C pins declaration
LiquidCrystal_I2C lcd(0x27, 16, 2);

void setup()
{
lcd.begin();//Initializing display
lcd.backlight();//To Power ON the back light
//lcd.backlight();// To Power OFF the back light

}

void loop()
{
//Write your code
lcd.setCursor(0,0); //Defining positon to write from first row,first column .
lcd.print("20/12/2018"); //You can write 16 Characters per line .
delay(1000);//Delay used to give a dynamic effect
lcd.setCursor(0,1);  //Defining positon to write from second row,first column .
lcd.print("Saved calls 1000");
delay(8000);

lcd.clear();//Clean the screen
lcd.setCursor(0,0);
lcd.print(" Yesterday results  ");
lcd.setCursor(0,1);
lcd.print(" 1000 variable value ");
delay(8000);
}

ieee488

1. Write a program to query your database.
2. Communicate the result of that query to your Arduino.
3. Arduino writes that result to LCD.



All you have shown is a sketch for #3.


I suggest you get to work on #1 and #2.

.


Go Up