RAK14000 With RAK4631 WisBlock Core Guide
Prerequisite
-
Assemble the RAK14000 with a WisBlock Base and WisBlock Core by following the RAK14000 Installation Guide.
-
Download and install the Arduino IDE, then add the RAKwireless Core boards by installing the RAKwireless Arduino BSP.
-
USB Cable
Software Configuration and Example
In this example, you will be using E-Paper and the Three-Pushbutton Switch to demonstrate functionality. If you already installed the RAKwireless Arduino BSP, the WisBlock Core and example code should now be available on the Arduino IDE.
- Select the RAK4631 WisBlock Core you have.
Figure 1: Selecting RAK4631 as WisBlock Core- Install the Adafruit GFX Library.
- Open the Arduino IDE.
- On the Menu bar, click Sketch > Include Library > Manage Libraries.
- On the Library Manager text area, type adafruit gfx.
- To finish installation, click on the Install button highlighted in yellow.
Figure 1: Adafruit GFX Library Install- Install the Adafruit EPD Library.
- Open the Arduino IDE.
- On the Menu bar, click Sketch > Include Library > Manage Libraries.
- On the Library Manager text area, type adafruit epd.
- To finish installation, click on the Install button highlighted in yellow.
Figure 1: Adafruit EPD Library Install- You can access the programming guide for the RAK14000 module by opening the example codes.
Figure 1: Opening RAK14000 example for RAK4631 WisBlock CoreYou will need to change this section of the code if you are using an E-Paper with different resolution from another vendor.
typedef struct DEPG {
int width;
int height;
int position1_x;
int position1_y;
int position2_x;
int position2_y;
int position3_x;
int position3_y;
int position4_x;
int position4_y;
} DEPG;
// DEPG DEPG_HP = {250,122,40,20,40,30,40,50,90,40}; //use this for white-black-red version
DEPG DEPG_HP = {212,104,30,15,30,25,30,45,80,30}; // use this for white-black version
Adafruit_SSD1680 display(DEPG_HP.width, DEPG_HP.height, EPD_MOSI,
EPD_SCK, EPD_DC, EPD_RESET,
EPD_CS, SRAM_CS, EPD_MISO,
EPD_BUSY);
- After opening the example code, you can now select the right port and upload the code.
Figure 1: Selecting the correct Serial Port
Figure 1: Uploading the RAK14000 example code- Once you have successfully uploaded the example sketch, you should be able to see the image output on the E-Paper. You can also see the corresponding button pressed in the Serial Monitor.
Resources
For all supported WisBlock Core modules, refer to the RAK14000 E-Paper Monochrome Sample Code for an example of controlling the monochrome e-paper display.
