www.joy-it.net
Pascalstr. 8 47506 Neukirchen-Vluyn
3.2. Code example
3.2.1 SPI
For the SPI connection, you can use the library iwi_SPI_RS0010 from
iwi1, which is published under the GNU General Public License v3.0 .
You can download the library here. You can include the downloaded
library in your Arduino IDE by selecting the .zip file under Sketch →
Include Library → Add .ZIP Library... . Select there the downloaded libra-
ry and restart your Arduino IDE to be able to use this library.
Copy the following code into your IDE to test your display. This will
display three dierent images on your display. To run the code example,
click on Upload.
Make sure that Board and Port are selected correctly under Tools.
#include "iwi_SPI_RS0010.h"
SPI_RS0010 rs;
void setup(){
rs.initSPI(12,11,13,10);
rs.begin(16,2,1);
}
void loop(){
rs.clearBuf();
rs.drawLine(0,0,100,16,1);
rs.displayBuf();
delay(2000);
rs.clear();
rs.clearBuf();
rs.drawString(0,0,"TEST",1,1,1);
rs.displayBuf();
delay(2000);
rs.clear();
rs.clearBuf();
rs.drawBoldString(0,0,"10:45",1,1);
rs.displayBuf();
delay(2000);
rs.clear();
rs.clearBuf();
}
3.2.1 Parallel
The display has 6800 and 8080 parallel interfaces. Both interfaces can
communicate with 4-bit as well as with 8-bit.
For this purpose, we provide the OLED16x2-IST0010-Arduino-Library
library. This has been published under the MIT-License.
You can download the library here. You can include the downloaded
library in your Arduino IDE by selecting the .zip file under Sketch →
Include Library → Add .ZIP Library... . Select there the downloaded libra-
ry and restart your Arduino IDE to be able to use the library.
There you will find four examples (4-bit 6800, 4-bit 8080, 8-bit 6800, 8-bit
8080). You can find these under File → Examples →
OLED16x2-IST0010-Arduino-Library.
Make sure that Board and Port are selected correctly under Tools.