Hi, how can i pass String through I2C?
i have the master and a LiquidCrystal connected to the slave.
in Master i'll type anything through Serial monitor like "dfss"
then how can pass this String through I2C and display to LCD?
master
void setup()
{
Serial.begin(9600);
Wire.begin();
}
void loop()
{
while(Serial.available())
{
Wire.beginTransmission(5);
Wire.write("asd");
Wire.endTransmission();
}
}
slave
void loop()
{
}
void receiveEvent(int howMany)
{
while(Wire.available())
{
char C = Wire.read();
if(aChar > 0)
{
lcd.print(aChar);
}
}
}
please guide me.