Giphypop + Screens

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
Post Reply
blckpstv
Posts: 28
Joined: Thu Dec 15, 2016 9:11 pm
Location: Belgium

Giphypop + Screens

Post by blckpstv » Thu Jan 19, 2017 2:50 pm

I'm managed to get a working micropython on the Wemos D1 mini & pro.

Now I was wondering the following.

I've also managed to install giphypop on my mac via regular python and managed to get a json url with the image.

1. Would it be possible to import giphypop api on the micropython.
2. If possible, how can I use the image url to send it to a screen. (regular python answer is good to start with)

If it's to broad a question, is it possible to show me what to look for in terms of sending url (images) to a screen?

Thanks ahead!!

User avatar
deshipu
Posts: 1388
Joined: Thu May 28, 2015 5:54 pm

Re: Giphypop + Screens

Post by deshipu » Thu Jan 19, 2017 3:25 pm

No and no. MicroPython is Python only from a subset of syntax, and is not actually compatible with the Python standard library and all the operating system services that you are used to. That means, that most libraries written for your PC will not work out of the box without modification in MicroPython. They need to be re-written to take into account the constraints of the platform.

There is also currently do easy way to send an image to any screen, not to mention animating that image. There is support for the I2C and SPI protocols that are often used by displays, and you can also write a driver using one of the parallel communication modes they have, however, the details of that depend very much on the particular screen module you are using. You might want to take a look at this library of drivers for different screens: https://github.com/adafruit/micropython ... gb-display

Reading and decoding a GIF file is a huge task in and of itself, and probably a big project. There is some work ona PNG library here: https://github.com/Ratfink/micropython-png -- you might be able to get that to work.

User avatar
deshipu
Posts: 1388
Joined: Thu May 28, 2015 5:54 pm

Re: Giphypop + Screens

Post by deshipu » Thu Jan 19, 2017 3:29 pm

One thing that you might do is to download and decode the gif image on your PC, and send to your ESP8266 image data already converted to a format suitable for the display.

blckpstv
Posts: 28
Joined: Thu Dec 15, 2016 9:11 pm
Location: Belgium

Re: Giphypop + Screens

Post by blckpstv » Thu Jan 19, 2017 3:38 pm

Ok best to start from a normal computer and work with python because all other options are a too big a leap for me know.
I'm going to wander around at the normal python forums for this project. :)

Thanks!

Post Reply