Micro:bit Question

Write a standalone program to simulate the code writing sub-program. Guidelines and hints:
First, write a program that can draw 5 “program lines” of different lengths, from left to right.
Notice that at all times, there are at most 5 lines on the screen. Does that perhaps suggest an array of line lengths? How would you add and remove lines to keep it at most 5-element long?
Finally, notice that while writing the “first page” of the program, there is no scrolling until the fifth line is reached. How would you modify your program to achieve this?
Write a standalone program to simulate rain for one of the screensavers. Guidelines and hints:
First, write a program to have LED “raindrops” fall from top to bottom, and disappear at the bottom of the screen.
Now make them vary in brightness.
Now think how you can have some of the go faster than others, and match that with the brightness. You don’t have to get this right in this step, but it will help to think about it and generate some ideas.
Write a standalone program to simulate a frequency bar for one of the screensavers. Guidelines and hints:
First, write a program that can plot LED columns from botton to top and back. Note the vertical coordinate grows from top to bottom, so you will need to invert it.
Randomize the height the way you randomized the line length in the code-writing simulation, and make the highest point show at highest brightness. Can you see another application of an array of highest point vertial coordinates?
How would you make the column retreat down while the highest point stays until the columns is gone, and only then turns off?


Buy plagiarism free, original and professional custom paper online now at a cheaper price. Submit your order proudly with us

Essay Hope