drawRGBBitmap with data from a server (or API)
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- modemmike
- Posts: 5
- Joined: Tue Jul 19, 2022 7:29 pm
drawRGBBitmap with data from a server (or API)
Has anyone figured out a way to load bitmap data from an external server? I tried many different ways using JSON but wasn't able to figure it out. I would like to be able to dynamically load images from a server (HTTP get) rather than having them hardcoded into the sketch for the Matrix Portal M4.
- modemmike
- Posts: 5
- Joined: Tue Jul 19, 2022 7:29 pm
Re: drawRGBBitmap with data from a server (or API)
So I've managed to get the image data from a server and store it into a text file via Adafruit_SPIFlash.h but now, how do I drop that data into?
The text file just contains: 0xa3cb, 0x79e3, 0x79e3, 0x79e3, 0x79e3, 0x79e3, 0x79e3, 0x79e3, 0x79e3, 0x0000, 0x0000, 0x0000 and I already have the image sizes in the variables.
Basically, I'm just trying to display images that can be pulled in dynamically for my own API server. So this is what I was thinking (I'm terrible with C):
This is the last bit I haven't figured out and I've been working on this for a week LOL, thank you for reading!
Code: Select all
matrix.drawRGBBitmap(0, 0, MYTEXTFILE, 32, 32);
Basically, I'm just trying to display images that can be pulled in dynamically for my own API server. So this is what I was thinking (I'm terrible with C):
Code: Select all
uint16_t imagenumber1 [] PROGMEM = { MYTEXTFILE }
Please be positive and constructive with your questions and comments.