title: Which Commands do I have to use SSD1306 over I²C?
body: <p>I want to create a simple linux driver for the SSD1306 that I have connected to my Raspberry Pi over I²C.</p>
  
  <p>Before I start coding, I want to get to know the device and which commands I have to send. I use the i2c-tools for linux to test my commands. I studied some Arduino projects and the datasheet of the SSD1306, but I could only recreate a few commands on the commandline:</p>
  
  <p>Initializing the device: <code>i2cset -y 1 0x3c 0xAE 0x20 0x10 0xb0 0xc8 0x00 0x10 0x40 0x81 0x7f 0xa1 0xa6 0xa8 0x3f 0xa4 0xd3 0x00 0xd5 0xf0 0xd9 0x22 0xda 0x12 0xdb 0x20 0x8d 0x14 0xaf i</code></p>
  
  <p>Send data to the device's memory: <code>i2cset -y 1 0x3c 0x40 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF i</code>
  This fills some Pixels from the current position to the right.</p>
  
  <p>Jumping to the upper left pixels: <code>i2cset -y 1 0x3c 0xb0 0x00 0x10 i</code>
  This didn't always work :(</p>
  
  <p>0x3c is the address of my SSD1306 device</p>
  
  <p>I would be glad if someone could tell me some more commands or knows where I can find a good example or tutorial with comments.</p>
  
  <p>Thanks,</p>
  
  <p>p0kR</p>