“map()” function

The teacher give us this code :MAP

Task:

  • Create a code to represent 6 lines on the display in groups of two . Each two with a different color [ Red , yellow and green ]

Research:

I had to look over some codes and I managed to see how can I make the program works , and my first code made by myself will look like this : MAP.PNG

  • This is a basic version of what I’ve got , now I wanna modify it to make it an algorithm which will select by itself the colors of the lines .

Development :

MAP.PNG

  • I adapted an example code to make it more likely like me then I found a bug , there is a small green line between red and yellow which shouldn’t be there .

Coding Task Finished:

MAP

Leave a comment