You must first complete Animating Text before viewing this Lesson

Looping Animated Text

Introduction

We will now learn how to use the invert color of what we used to “erase” something as well as how to loop something.

Components Needed

  • Little Python Brain
  • A tablet/phone/laptop
Steps

1

"Erasing" the text

We’re now going to make a second part to the animation we did on the previous lesson. This time around, we want it to be “removing” or “erasing” what we wrote on the first loop.

Simply copy the whole for loop for now. Afterwards, change the color on the oled.text() from 1 to 0.

2

Looping the whole thing

Afterwards, drag the two for loops inside a while True block!

The Complete Code

That’s it! You have now learned how to do for loops, take a length of a string, and write and erase screen text!

Back to: Intermediate > Animated Text
© 2020 Little Python

CONTACT US

    Log in with your credentials

    or    

    Forgot your details?

    Create Account