{"action":"created","issue":{"url":"https://api.github.com/repos/rm-hull/ssd1306/issues/1","labels_url":"https://api.github.com/repos/rm-hull/ssd1306/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/rm-hull/ssd1306/issues/1/comments","events_url":"https://api.github.com/repos/rm-hull/ssd1306/issues/1/events","html_url":"https://github.com/rm-hull/ssd1306/issues/1","id":55374937,"number":1,"title":"SSD1306 and SH1106 compatibility","user":{"login":"xes","id":3456902,"avatar_url":"https://avatars.githubusercontent.com/u/3456902?v=3","gravatar_id":"","url":"https://api.github.com/users/xes","html_url":"https://github.com/xes","followers_url":"https://api.github.com/users/xes/followers","following_url":"https://api.github.com/users/xes/following{/other_user}","gists_url":"https://api.github.com/users/xes/gists{/gist_id}","starred_url":"https://api.github.com/users/xes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xes/subscriptions","organizations_url":"https://api.github.com/users/xes/orgs","repos_url":"https://api.github.com/users/xes/repos","events_url":"https://api.github.com/users/xes/events{/privacy}","received_events_url":"https://api.github.com/users/xes/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":15,"created_at":"2015-01-24T15:43:18Z","updated_at":"2015-02-07T21:42:05Z","closed_at":null,"body":"Hi! Thank you for this nice piece of software!\r\nI'm trying to use this to drive an SH1106 with a cubie board but i should change it a little bit since \r\nthe only thing i can obtain now is some line and a display filled with noise just like in the image here:\r\nhttps://github.com/adafruit/Adafruit_SSD1306/issues/14\r\n\r\nThe SH1106 controller has an internal RAM of 132x64 pixel (while the SSD1306 has 128x64 pixel).\r\nIt seems, that the 128x64 OLED is centered in most cases within the 132x64 area, that means pixel (2,0) in ram is pixel (0,0) on the display. \r\nNow ebay is filled with these oled displays (often with an unclear description saying SH1106/SSD1306) and after digging a lot on the web, i have found there is now way to use them with a raspberry or a cubie board.\r\nDo you think you could give me some help or add an option to support both display models? \r\n\r\nRef:\r\nhttp://forum.arduino.cc/index.php?topic=265557.0\r\nhttp://forum.arduino.cc/index.php?topic=256374.0\r\nhttp://www.mikrokontroler.pl/system/files/SH1106.PDF\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/rm-hull/ssd1306/issues/comments/73384556","html_url":"https://github.com/rm-hull/ssd1306/issues/1#issuecomment-73384556","issue_url":"https://api.github.com/repos/rm-hull/ssd1306/issues/1","id":73384556,"user":{"login":"rm-hull","id":1915543,"avatar_url":"https://avatars.githubusercontent.com/u/1915543?v=3","gravatar_id":"","url":"https://api.github.com/users/rm-hull","html_url":"https://github.com/rm-hull","followers_url":"https://api.github.com/users/rm-hull/followers","following_url":"https://api.github.com/users/rm-hull/following{/other_user}","gists_url":"https://api.github.com/users/rm-hull/gists{/gist_id}","starred_url":"https://api.github.com/users/rm-hull/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rm-hull/subscriptions","organizations_url":"https://api.github.com/users/rm-hull/orgs","repos_url":"https://api.github.com/users/rm-hull/repos","events_url":"https://api.github.com/users/rm-hull/events{/privacy}","received_events_url":"https://api.github.com/users/rm-hull/received_events","type":"User","site_admin":false},"created_at":"2015-02-07T21:42:05Z","updated_at":"2015-02-07T21:42:05Z","body":"That's interesting that 0x80 for the command mode doesn't work...\r\n\r\nWhat happens if you change the sense of the while loop into a for loop at lines 124-137 of _device.py_ to something like:\r\n\r\n```python\r\n            buf = []\r\n            for x in xrange(self.width):\r\n                buf.append(\r\n                    pix[(x, i + 0)] & 0x01 |\r\n                    pix[(x, i + 1)] & 0x02 |\r\n                    pix[(x, i + 2)] & 0x04 |\r\n                    pix[(x, i + 3)] & 0x08 |\r\n                    pix[(x, i + 4)] & 0x10 |\r\n                    pix[(x, i + 5)] & 0x20 |\r\n                    pix[(x, i + 6)] & 0x40 |\r\n                    pix[(x, i + 7)] & 0x80)\r\n```"}}