Hookup Guide
This tutorial explains how to get your E-Paper screen alive. It is split into the following three sections:
- 1) Hardware Hookup – How to connect the breakout board with your microcontroller.
- 2) Including the Adafruit GFX library – How to include the library.
- 3) Verifying the pin mapping – Review the pin mapping and adjust if necessary.
1) Hardware Hookup
Now it’s time to wire things up (if you have a Paperino Shield you can just jump over to the next section)! The breakout board provides access to 12 pins. To communicate with the display you will need eight pins: 3V3, GND, 4-wire SPI and two more pins for the IC (called reset & busy pin.) To get access to the integrated accelerometer you will need to connect more GPIO pins (called CS2, IN1 & IN2 optionally). You can see the wiring to some popular Arduino MCUs below:
The following table summarises the needed connections again:
# | Pin | Function | Photon* / Electron / Bluz | Arduino MKRFOX1200 | NodeMCU | WeMosD1 Mini | Raspberry Pi Zero W |
---|---|---|---|---|---|---|---|
1 | MOS | SPI MOSI | A5 | MOSI | D7 | D7 | MOSI |
2 | MIS | SPI MISO | A4 | MISO | D6 | D6 | MISO |
3 | CLK | SPI clock | A3 | SCK | D5 | D5 | SCK |
4 | CS1 | SPI chip select for ePaper driver IC | A2** | A2** | D2** | D2** | D2** |
5 | RST | Digital pin to reset driver IC | A0** | A0** | D0** | D0** | D0** |
6 | BSY | Digital pin to sense state of driver IC | A1** | A1** | D1** | D1** | D1** |
7 | 3V3 | Regulated 3.3V power supply | 3V3 | VCC | 3V3 | 3V3 | 3V3 |
8 | GND | Ground | GND | GND | GND | G | GND |
9 | - | (unused) | (unused) | (unused) | (unused) | (unused) | (unused) |
10 | CS2 | SPI chip select for accelerometer IC | D6** | A6** | D3** | D3** | D3** |
11 | IN2 | Interrupt line #2, e.g. for tap sensing | WKP** | A5** | D4** | D4** | D4** |
12 | IN1 | Interrupt line #1, e.g. for wake-up of deep sleeping MCU | WKP** | (not sup.) | (not sup.) | (not sup.) | (not sup.) |
* Same wiring as for Paperino Shield for Particle used ** or any other free GPIO pin
2) Using the Adafruit GFX Library with Paperino E-Paper display
Now that we have wired-up the Paperino breakout board with the MCU, it’s time to get started writing your own application! For this we’ll need to include the Adafruit GFX library
and the hardware-specific library PL_microEPD
. The integration varies depending on your used IDE.
Particle Web-IDE
If you are using the Particle Web-IDE please go to the Library Manager and search for PL_microEPD
, you will see the latest version. Select one of the demos, i.e. the first one called _01_HelloWorld.ino
and click on the button Use this example.
This pastes a copy of the demo into your private App section. Now let’s repeat this step again by searching for Adafruit_GFX
and add this library to the demo file by pressing the button Include in Project
. That’s it, almost! You should now have a first demo with two linked libraries. All you need to check is the use of the correct pin mapping, which is described in the next section.
Arduino Web-IDE
After log-in to the Arduino WEB-IDE, please go to the libraries section and search for PL_microEPD
. You will there get the latest library release together with the example sketches to start with (please proceed with the first example).
Arduino IDE
Check whether you have an actual release of the Arduino IDE installed or download the latest version from here. Then please follow “Sketch” — “Include Library” - “Manage Libraries...”, search for “PL_microEPD” and select the install button. This will copy the library and its demos sketches to your local Arduino folder. After rebooting the IDE, go to “File” - “Examples” - “PL_microEPD” where you can now see the different demos and for example load the first example.
3) Verifying the pin mapping
We are just there; just need to align the physical wiring from the previous section with the pin mapping in the sketch:
#define EPD_RST A0 // Please align with your individual wiring
#define EPD_BUSY A1 // Please align with your individual wiring
#define EPD_CS A2 // Please align with your individual wiring
If you connected the reset pin physically with e.g. D0 (because your favourite micro controller has no Analog GPIOs available), then rename A0 with D0.
If you are interested in how to write more complex features on the ePaper we suggest continuing with the examples section.