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?

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();
}
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.

  • no the adress is 0x63 tested with i2c scanner – Number_987 Aug 22 '16 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... – KennetRunner Sep 21 '16 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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.