web

Howto add animated gif to theme Twenty Sixteen Header Image

WordPress theme Twenty Sixteen is not able to upload animated gif as header picture. It is always going to change the picture to resized gif. This gif has only one frame and it is without a single movement.

It does not matter if you select Crop image or Skip cropping it is always cropped to following sizes 1200×280, 1024×238, 768×180, 300×70, 150×150. These pictures are more jpg than gif:-)

The easiest way how to change it is to find the location of the affected picture via right click and selecting “Copy image address”. It is going to give you a link on your website something like this:

https://www.example.ccom/wp-content/uploads/2018/10/pict.gif

if the original name was pict.gif. If you check the location on your web server you will find files with the different size for the same picture. They will be named gif, but there will be no animation. Just use resize service:

https://ezgif.com/resize

and make proper sizes of your original animated gif. Then upload them to the same directory on your web server as it points by link above. The replacement of static gif’s by the animated will work fine and you have animated gif in your header.

The normal way how to include animated gif’s in the posts works fine and the steps above are necessary only for the header file;-)

Programming

D1 mini blinking built in LED

Today we have successfully controlled LED on D1 mini. D1 mini is cheap chip from China, which has wifi connectivity. You can program it via Arduino IDE. There is a simple code for built in LED control. LED is connected to port D4 of D1 mini.

void setup() {
// put your setup code here, to run once:
pinMode(D4, OUTPUT);
}

void loop() {
// put your main code here, to run repeatedly:
digitalWrite(D4, HIGH);
delay(1000);
digitalWrite(D4, LOW);
delay(1000);
}

phone