/* Tiny Function Plotter (SSD1306 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 = 61; 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 = 10; const uint8_t Init[InitLen] PROGMEM = { 0x8D, // Charge pump 0x14, 0x20, // Memory mode 0x01, // Vertical addressing 0xA1, // Flip horizontally 0x81, // Set contrast 0xCF, // brighter 0xDB, // Set vcom detect 0x40, // brighter 0xAF // Display on }; void InitDisplay () { Wire.beginTransmission(address); Wire.write(commands); for (uint8_t i=0; i 7) Wire.write(- mode); else if (y < 0) Wire.write(0); else Wire.write((1<