/* Tiny Function Plotter (SH1106 version) - see http://www.technoblogy.com/show?2CFT David Johnson-Davies - www.technoblogy.com - 14th October 2018 ATtiny85 @ 8 MHz (internal oscillator; BOD disabled) CC BY 4.0 Licensed under a Creative Commons Attribution 4.0 International license: http://creativecommons.org/licenses/by/4.0/ */ #include // Constants int const address = 60; int const commands = 0x00; int const onecommand = 0x80; int const data = 0x40; int const onedata = 0xC0; // OLED display ********************************************** // Initialisation sequence for OLED module int const InitLen = 2; const uint8_t Init[InitLen] PROGMEM = { 0xA1, // Flip horizontally 0xAF // Display on }; void InitDisplay () { Wire.beginTransmission(address); Wire.write(commands); for (uint8_t i=0; i>4 & 0x0F)); // Column high nibble Wire.write(onecommand); Wire.write(0xB0 | i); // Page Wire.write(onedata); if (y > 7) Wire.write(- mode); else if (y < 0) Wire.write(0); else Wire.write((1<