More flag designs on a Raspberry Pi sense hat

In a previous article we created some flags at http://www.pibits.net/code/display-simple-flag-images-on-a-sense-hat.php

Anyway we have created some more flags for you to try on a sense hat

Japan

An attempt at the flag of Japan

from sense_hat import SenseHat
sense = SenseHat()
r = (255, 0, 0)
o = (255, 127, 0)
y = (255, 255, 0)
g = (0, 255, 0)
b = (0, 0, 255)
i = (75, 0, 130)
v = (159, 0, 255)
e = (0, 0, 0)
w = (255, 255, 255)
image = [
w,w,w,w,w,w,w,w,
w,w,w,w,w,w,w,w,
w,w,w,r,r,w,w,w,
w,w,r,r,r,r,w,w,
w,w,r,r,r,r,w,w,
w,w,w,r,r,w,w,w,
w,w,w,w,w,w,w,w,
w,w,w,w,w,w,w,w
]
sense.set_pixels(image)

 

Poland

This is an attempt at the Polish flag

from sense_hat import SenseHat
sense = SenseHat()
r = (255, 0, 0)
o = (255, 127, 0)
y = (255, 255, 0)
g = (0, 255, 0)
b = (0, 0, 255)
i = (75, 0, 130)
v = (159, 0, 255)
e = (0, 0, 0)
w = (255, 255, 255)
image = [
w,w,w,w,w,w,w,w,
w,w,w,w,w,w,w,w,
w,w,w,w,w,w,w,w,
w,w,w,w,w,w,w,w,
r,r,r,r,r,r,r,r,
r,r,r,r,r,r,r,r,
r,r,r,r,r,r,r,r,
r,r,r,r,r,r,r,r
]
sense.set_pixels(image)

 

Ukraine

The flag of the Ukraine this time

from sense_hat import SenseHat
sense = SenseHat()
r = (255, 0, 0)
o = (255, 127, 0)
y = (255, 255, 0)
g = (0, 255, 0)
b = (0, 0, 255)
i = (75, 0, 130)
v = (159, 0, 255)
e = (0, 0, 0)
w = (255, 255, 255)
image = [
b,b,b,b,b,b,b,b,
b,b,b,b,b,b,b,b,
b,b,b,b,b,b,b,b,
b,b,b,b,b,b,b,b,
y,y,y,y,y,y,y,y,
y,y,y,y,y,y,y,y,
y,y,y,y,y,y,y,y,
y,y,y,y,y,y,y,y
]
sense.set_pixels(image)

 

Colombia

The flag of Colombia this time

from sense_hat import SenseHat
sense = SenseHat()
r = (255, 0, 0)
o = (255, 127, 0)
y = (255, 255, 0)
g = (0, 255, 0)
b = (0, 0, 255)
i = (75, 0, 130)
v = (159, 0, 255)
e = (0, 0, 0)
w = (255, 255, 255)
image = [
y,y,y,y,y,y,y,y,
y,y,y,y,y,y,y,y,
y,y,y,y,y,y,y,y,
y,y,y,y,y,y,y,y,
b,b,b,b,b,b,b,b,
b,b,b,b,b,b,b,b,
r,r,r,r,r,r,r,r,
r,r,r,r,r,r,r,r
]
sense.set_pixels(image)

 

Denmark

The Danish flag is not too difficult to do

from sense_hat import SenseHat
sense = SenseHat()
r = (255, 0, 0)
o = (255, 127, 0)
y = (255, 255, 0)
g = (0, 255, 0)
b = (0, 0, 255)
i = (75, 0, 130)
v = (159, 0, 255)
e = (0, 0, 0)
w = (255, 255, 255)
image = [
r,r,w,w,r,r,r,r,
r,r,w,w,r,r,r,r,
r,r,w,w,r,r,r,r,
w,w,w,w,w,w,w,w,
w,w,w,w,w,w,w,w,
r,r,w,w,r,r,r,r,
r,r,w,w,r,r,r,r,
r,r,w,w,r,r,r,r
]
sense.set_pixels(image)

 

Thailand

An attempt at the Thailand flag

from sense_hat import SenseHat
sense = SenseHat()
r = (255, 0, 0)
o = (255, 127, 0)
y = (255, 255, 0)
g = (0, 255, 0)
b = (0, 0, 255)
i = (75, 0, 130)
v = (159, 0, 255)
e = (0, 0, 0)
w = (255, 255, 255)
image = [
r,r,r,r,r,r,r,r,
w,w,w,w,w,w,w,w,
b,b,b,b,b,b,b,b,
b,b,b,b,b,b,b,b,
b,b,b,b,b,b,b,b,
b,b,b,b,b,b,b,b,
w,w,w,w,w,w,w,w,
r,r,r,r,r,r,r,r
]
sense.set_pixels(image)

 

Chile

This is about as good as I could do for Chile

from sense_hat import SenseHat
sense = SenseHat()
r = (255, 0, 0)
o = (255, 127, 0)
y = (255, 255, 0)
g = (0, 255, 0)
b = (0, 0, 255)
i = (75, 0, 130)
v = (159, 0, 255)
e = (0, 0, 0)
w = (255, 255, 255)
image = [
b,b,b,w,w,w,w,w,
b,b,b,w,w,w,w,w,
b,b,b,w,w,w,w,w,
b,b,b,w,w,w,w,w,
r,r,r,r,r,r,r,r,
r,r,r,r,r,r,r,r,
r,r,r,r,r,r,r,r,
r,r,r,r,r,r,r,r
]
sense.set_pixels(image)