Inkplate 5V2 – HTTPS certificate
Now that Inkplate is online, you'll probably want to receive data from a website securely. Here's an example of using an HTTPS certificate for your connection.
HTTPS example
This example downloads a .bmp file from the web securely. You provide a certificate for the website, which is validated when the connection is made. Use applyHttpsCertificate() to store the certificate for your connection:
Inkplate inkplate(INKPLATE_1BIT);
const char* certificate = ""; // Insert your certificate
//..
void setup(){
inkplate.applyHttpsCertificate(certificate);
}
//...
inkplate.applyHttpsCertificate()
Applies a certificate that will be checked when communicating with a website.
Returns type: void
Function parameters:
| Type | Name | Description |
|---|---|---|
const char* | certificate | The certificate in a string format. |
Full example
See these functions at work in a complete sketch:
Inkplate5V2_HTTPS_With_Certificate.ino
This example shows how you can download a .bmp file (picture) from the web securely by providing a certificate for the website that will be validated upon connection and display that image on the e-paper display.