Objective: Learn how to utilize the "pen" extension within Scratch to create an interactive whiteboard utilizing loops, conditionals and sensing.
Final Product:
Graphical Template: https://scratch.mit.edu/projects/138943087/ (the "see inside" button will pull up the programming interface).
You will also need to add in the paint extension (see the following two step process):
Select the "Extension addition" button |
Select the pen extension. |
Painting Scripts in Scratch (creates the paintbrush) |
Some more advanced pen features (eraser, thickness, etc.) |
e: switches to "eraser" mode
p: switches to "painting mode"
c: erases everything on your screen
s: changes pen saturation by ten (i.e. color change)
1: increases pen size by one (i.e. makes your strokes thicker)
Extension: Test out some of the other features within the pen extension and see how they affect your painting program!
Integrating with the Stylus: This tutorial fits in well with the stylus tutorial. Once you have completed the steps detailed in the paragraph below, you will have programmed a painting application for your digital stylus.
If you have a Scratch account, you can save your project by clicking the remix button on the top bar. Once you have saved the project to your own account you can share it to your profile by clicking the "share" button.
On your touchscreen device navigate to the following link: https://scratch.mit.edu/users/YourScratchUserNameHere/ replacing "YourScratchUserNameHere" with your scratch username. Click on the shared painting application. Press the Green Flag and enjoy the use of your self-made digital stylus in your own self-made painting application!
Completed Program: Link
No comments:
Post a Comment