View Single Post
kimmoli's Avatar
Posts: 562 | Thanked: 2,744 times | Joined on Dec 2013 @ Espoo, Finland
#31
crap. seems that i haven't saved latest arduino sketch...
but it was something like this. (todo: rewrite @ JHD)

Code:
#include <Wire.h>
  /* Initialize i2c */
  Wire.begin(0x22);            
  Wire.onReceive(receiveEvent);
Code:
/* I2C receive event... */
void receiveEvent(int howMany)
{
  //ereader.wake();
  while(1 < Wire.available()) 
  {
    char c = Wire.read(); 
    Serial.print(c);
    ereader.put_char(x, y, c, true);
    x+=9;
  }
  int x = Wire.read();  
  Serial.println(x);       
  ereader.put_char(x, y, c, true);
  x=0;
  y+=10;
  ereader.show();
}
__________________
TOH ideas, concepts and creations since 2013 toholed tohuart toheink Heebo tohIRi i2ctool tohmm LeTOH FMTOH
 

The Following 3 Users Say Thank You to kimmoli For This Useful Post: