For the final phase of animating on the arduinos the four of us (Eman, Amreen, Amira and I) decided to collaborate again. Concepts we considered were trains going from a screen to the next, characters running from screen to screen. We realised that trying to make things sync that way wouldn’t really work very well. We came with the idea of creating simple characters, 1 on 2 screens that are dancing next to each other.
I controlled the bottom half of wall.e and genie while Amreen controlled the top half. We had to work together to make the animation look somewhat synced, if not perfectly.
^ I was planning on making his tail move, but instead it just looked disjointed and looked like too much with the genies hands dancing AND the lamp blinking. I focused on just making the lamp blink quickly.
^ Our next plan was to give the characters context, otherwise they just looked like they were floating in emptiness. It sounds simple. But creating a dancefloor was a big issue.
dance floor issues:
Initially it wasn’t possible to play the two (character and the dance floor) at the same time. I would draw the floor, but it would disappear when I wanted to add the character:
I asked my sister if she could suggest any solutions. She suggested that I do a search on threads . I wasn’t sure what she meant, but it was meant to bypass the coding issue (playing two things at the same time wasn’t working). But in the end it turned out that Arduino didn’t support threads?
In the end, she worked with me, giving me a crash course in coding and refreshing my high school maths: “What is a modulus???” – her
We tried using the concept of the modulus to make the two animations play at the same at such a fast speed that it looked as if they were playing together (details in the comments of the code):
^ The percentage sign here wasn’t a percentage, it was a check against the number we gave.
In the end she figured it out…I figured that she was playing the two at the same time in the areas where the screen was blank (if i=0x000000):
I added an extra line of code to limit that to the last line
^ As you can see it still wasn’t seamless. The characters animation would play over itself…
In the end the Professor helped:
^ I still need to get an explanation of how he achieved this so simply……….