1

I am having an Arduino Uno and a C2042A LCD with I2C shield on it. Because the VirtualWire library does not work for me. I tried only the wire library but it's still not working:

My code:

#include <Wire.h>
void setup() {
 Wire.begin(0x63);
}
void loop() {
 Wire.write(4);
}

I just read on this website which commands you have to use but it doesn't do anything. What is my fault, how to solve it?

dda
1,5951 gold badge12 silver badges17 bronze badges
asked Aug 22, 2016 at 12:50
3
  • Please add a link to the LCD Shield. Commented Aug 22, 2016 at 13:02
  • use can see and read about the lcd here: robot-electronics.co.uk/htm/Lcd03tech.htm Commented Aug 22, 2016 at 13:06
  • You need to first read about how to use Wire and then the LCD communications protocol. The above code snippet is not a complete command. Commented Aug 22, 2016 at 15:37

3 Answers 3

1

SOLVED!

I forgot to write beginTransmission(). Here's my code:

#include <Wire.h>
void setup() {
 Wire.begin(0x63);
}
void loop() { 
 Wire.beginTransmission(0x63);
 Wire.write(byte(0x00));
 Wire.write("Temperatur:");
 Wire.endTransmission();
}
per1234
4,2782 gold badges23 silver badges43 bronze badges
answered Aug 22, 2016 at 15:41
0
0

The documentation under the link you posted says: "The I2C display is located on the I2C bus at an address of 0XC6.", not the address you have used in your code.

answered Aug 22, 2016 at 13:54
2
  • no the adress is 0x63 tested with i2c scanner Commented Aug 22, 2016 at 15:20
  • 1
    @marangisto many I2C addresses are quoted like this as an 8 bit value - made up of the 7 bit address plus the data direction (read/write) bit. 0b11000110 (0xC6) removing the least significant bit is 0b1100011 (0x63). There is also 10 bit addressing (i2c-bus.org/addressing/10-bit-addressing), but that only confuses things even further... Commented Sep 21, 2016 at 16:37
0

You can't begin writing unless you first initialize it like with Serial.begin

In this case you don't show Wire.beginTransmission.

Perhaps it is in the code you didn't show us, but it is required.

answered May 29, 2017 at 3:35

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.