You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#A small tool that creates the content of a byte array from the output of the following website for the used display: https://www.dcode.fr/binary-image
#create a black and white png with the dimensions: 128x32 Pixel
#The script searches the current folder for the input.txt file
#The array elements are output in the terminal.
import math
#read file and remove newlines
with open('input.txt', 'r') as file:
data = file.read().replace('\n', '')
#calc length of the array
maxval = math.ceil(len(data)/8)
output = ""
page = 0
#loop for every array element
for index in range(maxval):
#Read specification of the display to understand how to create the bytes. Isn't pretty, should only work.