Skip to content

Instantly share code, notes, and snippets.

@atc1441
Created May 16, 2020 18:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save atc1441/667fe0ee4d64007766876b1a18b097a7 to your computer and use it in GitHub Desktop.
Save atc1441/667fe0ee4d64007766876b1a18b097a7 to your computer and use it in GitHub Desktop.
void oledInit() {
nrf_gpio_cfg_output(23);
digitalWrite(23 , 0);
setGPIOforOLEDasOutput();
digitalWrite(oledSCK , LOW);
digitalWrite(oledRST, HIGH);
delay(20);
digitalWrite(oledRST, LOW);
delay(100);
digitalWrite(oledRST, HIGH);
delay(100);
spiCommand(-2);
spiCommand(-17);
spiCommand(-21);
spiWrite(20);
spiCommand(-124);
spiWrite(64);
spiCommand(-123);
spiWrite(-15);
spiCommand(-122);
spiWrite(-104);
spiCommand(-121);
spiWrite(40);
spiCommand(-120);
spiWrite(10);
spiCommand(-118);
spiWrite(0);
spiCommand(-117);
spiWrite(-128);
spiCommand(-116);
spiWrite(1);
spiCommand(-115);
spiWrite(0);
spiCommand(-114);
spiWrite(-33);
spiCommand(-113);
spiWrite(82);
spiCommand(-74);
spiWrite(32);
spiCommand(54);
spiWrite(72);
spiCommand(58);
spiWrite(5);
spiCommand(-112);
spiWrite(8);
spiWrite(8);
spiWrite(8);
spiWrite(8);
spiCommand(-67);
spiWrite(6);
spiCommand(-90);
spiWrite(116);
spiCommand(-65);
spiWrite(28);
spiCommand(-89);
spiWrite(69);
spiCommand(-87);
spiWrite(-69);
spiCommand(-72);
spiWrite(99);
spiCommand(-68);
spiWrite(0);
spiCommand(-1);
spiWrite(96);
spiWrite(1);
spiWrite(4);
spiCommand(-61);
spiWrite(23);
spiCommand(-60);
spiWrite(23);
spiCommand(-55);
spiWrite(37);
spiCommand(-66);
spiWrite(17);
spiCommand(-31);
spiWrite(16);
spiWrite(14);
spiCommand(-33);
spiWrite(33);
spiWrite(16);
spiWrite(2);
spiCommand(-16);
spiWrite(8);
spiWrite(38);
spiWrite(69);
spiWrite(9);
spiWrite(42);
spiWrite(8);
spiCommand(-15);
spiWrite(67);
spiWrite(112);
spiWrite(114);
spiWrite(54);
spiWrite(55);
spiWrite(111);
spiCommand(-14);
spiWrite(8);
spiWrite(38);
spiWrite(69);
spiWrite(9);
spiWrite(42);
spiWrite(8);
spiCommand(-13);
spiWrite(67);
spiWrite(112);
spiWrite(114);
spiWrite(54);
spiWrite(55);
spiWrite(111);
spiCommand(-19);
spiWrite(27);
spiWrite(11);
spiCommand(-84);
spiWrite(71);
spiCommand(-82);
spiWrite(119);
spiCommand(-53);
spiWrite(2);
spiCommand(-51);
spiWrite(99);
spiCommand(112);
spiWrite(7);
spiWrite(9);
spiWrite(4);
spiWrite(14);
spiWrite(15);
spiWrite(9);
spiWrite(7);
spiWrite(8);
spiWrite(3);
spiCommand(-24);
spiWrite(52);
spiCommand(98);
spiWrite(24);
spiWrite(13);
spiWrite(-19);
spiWrite(15);
spiWrite(113);
spiWrite(112);
spiWrite(-17);
spiWrite(112);
spiWrite(113);
spiWrite(24);
spiWrite(112);
spiWrite(112);
spiCommand(99);
spiWrite(24);
spiWrite(17);
spiWrite(19);
spiWrite(-15);
spiWrite(113);
spiWrite(112);
spiWrite(-13);
spiWrite(112);
spiWrite(113);
spiWrite(24);
spiWrite(112);
spiWrite(112);
spiCommand(100);
spiWrite(40);
spiWrite(41);
spiWrite(1);
spiWrite(-15);
spiWrite(0);
spiWrite(7);
spiWrite(-15);
spiCommand(102);
spiWrite(60);
spiWrite(0);
spiWrite(-51);
spiWrite(103);
spiWrite(69);
spiWrite(0);
spiWrite(69);
spiWrite(0);
spiWrite(16);
spiWrite(0);
spiCommand(103);
spiWrite(0);
spiWrite(60);
spiWrite(0);
spiWrite(0);
spiWrite(1);
spiWrite(84);
spiWrite(16);
spiWrite(50);
spiWrite(-104);
spiWrite(0);
spiCommand(116);
spiWrite(16);
spiWrite(-128);
spiWrite(-128);
spiWrite(0);
spiWrite(0);
spiWrite(78);
spiWrite(0);
spiCommand(53);
spiWrite(0);
spiCommand(33);
delay(120);
spiCommand(17);
delay(120);
spiCommand(41);
delay(120);
// setAddrWindowDisplay(0, 0, 240, 240);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment