I know this is probably a beginner/no-brainer question about a command I just don't know, but:
I'm using the PIL(Python Image Library) to write to an OLED via I2C for a project.
I can write to it alright, but when I create a loop, it writes the new message OVER the old message, causing the 2 to overlap the 1, and so on.
How can I remove either the selected line, or just one character, to replace with an updating number?
Note, the i increment is just a placeholder for other numeric data, where I just really need to update what's after "Num" with replacing it, not creating a 1/2/3 overlapped abomination. I just, with my still learning python, figured rewriting the line several numbers will be updated on, would be the easiest remedy.
for i in range(int(11)):
draw.text((0, top-8)," Num:"+str(i), font=ImageFont.truetype("fonts/arial.otf", 17), fill=255)
I know this is outside typical e14 posts, but since it's an I2C(IoT) module that can work for BeagleBone, Raspberry Pi, and the Edison (anything that can run Python on I2C), but I felt it appropriate to ask here how to make it work (compared to some unnamed sites where asking a noob programming question gets you ostracized).