Go Down

Topic: 2x of I2C LCD with VB6.0 .. so plz help me (Read 875 times) previous topic - next topic

emeraldcolumbia

Jul 11, 2016, 01:32 pm Last Edit: Jul 11, 2016, 02:03 pm by emeraldcolumbia
HI, can anyone help me for my little experiment?
i have 2 I2C LCD and i want sent text to these lcd from VB6.0

this is the form in vb6 that i create


and this is what i do in vb..so i need help to fill code to cmdSENT1 and cmdSENT2
Quote
Private Sub Form_Load()
On Error Resume Next
With MSComm1
       If .PortOpen Then .PortOpen = False
          .CommPort = 3
          .Settings = "9600,n,8,1"
          .DTREnable = True
          .RTSEnable = True
          .RThreshold = 1
          .SThreshold = 0
          .PortOpen = True
         
End With

If MSComm1.PortOpen = False Then
   MsgBox "No USB device available or wrong Com Port number", vbCritical, "Please check!"
End If
 
End Sub


Private Sub cmdSENT1_Click()

End Sub


Private Sub cmdSENT2_Click()

End Sub

this is what i do in arduino..also need help for this sketch.
Quote
#include <Wire.h>
#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd1(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE); // Set the LCD I2C address
LiquidCrystal_I2C lcd2(0x3F, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE); // Set the LCD I2C address

void setup()
{
  lcd1.begin(16,2);
  lcd2.begin(20,4);
 
  lcd1.backlight();
  lcd2.backlight();

  Serial.begin(9600);
 
  lcd1.print("LCD 1 Ready");
  lcd2.print("LCD 2 Ready");
}

void loop()
{
  if (Serial.available()){
    delay(100);
    lcd1.clear();
    lcd2.clear();
    while (Serial.available()>0){
      lcd1.write(Serial.read());       
    }
  }
}
sorry for my bad english..

groundFungus


UKHeliBob

Code: [Select]
  lcd1.begin(20,4);
  lcd2.begin(16,2);
Are you deliberately trying to confuse yourself ?

Your VB screenshot shows LCD1 has 2 rows of text and LCD2 has 4.  I know that this is trivial to put right but do it now and don't wait to fix it later.  More consistent names for the text boxes would also be a good idea.
Please do not send me PMs asking for help.  Post in the forum then everyone will benefit from seeing the questions and answers.

emeraldcolumbia

Code: [Select]
  lcd1.begin(20,4);
  lcd2.begin(16,2);
Are you deliberately trying to confuse yourself ?

Your VB screenshot shows LCD1 has 2 rows of text and LCD2 has 4.  I know that this is trivial to put right but do it now and don't wait to fix it later.  More consistent names for the text boxes would also be a good idea.
oh,im sorry..my bad..already edit at my first post.

UKHeliBob

Quote
oh,im sorry..my bad..already edit at my first post.
Thanks a lot. 
Now my comment looks stupid.
Please do not send me PMs asking for help.  Post in the forum then everyone will benefit from seeing the questions and answers.

Go Up