Go to the MIT App Inventor and log in using your google account
Click on "My Projects" on the top and then press the New button.
Name the new project Day1
Click on Day1 to open it
Open an emulator or connect your device to app inventor using the MIT Companion App
The App Inventor has two main parts, The Designer and The Blocks
The Designer window has four columns: Palette, Viewer, Components, and Properties.
Palette has the tools that are available to you.
Viewer will show you what your device screen will look (more or less)
Components will show what you have put on the viewer so far and will organize those components in a logical way. You will change the names of the components in this part of the window.
Properties is where you will define how your component will look and how it will respond in your app.
You can switch between the Blocks and the Designer by clicking on the buttons found over the Properties.
The Blocks Screen is where you add pieces that will make your app's components do stuff.
Under the Drawing and Animation section of the Palette, click and drag Canvas from the Palette into the Viewer.
Select on Canvas1 on the Components window (it should be under Screen1)
Under the Properties window click BackgroundColor and select Blue
What happened on your device?
Under the Properties window change Canvas1's Width and Height to 200px
What happened on your device or emulator?
Under the Palette's Category Animation, drag Ball onto the Viewer's Canvas1. Place the ball anywhere on the Canvas.
What happened on your device? Ball1 should now be under Canvas1 on the Components window.
Select Ball1 on the Components window and change the speed property to 10.0. Watch you device when you press enter!
Ball1 should have moved slowed across Canvas1 until it reached the side. Ball1 is now stuck on the side of Canvas1.
When working with the app inventor, we will use the Blocks Screen to add block that tell the app to do things.
We don't want the Ball1 to stay stuck on the side of the Canvas1. We want it to bounce off the walls. To do that, we need to work with the blocks screen. Here is what to do:
Go to the Blocks Screen by pushing the Blocks button.
Look on the left side. You should see a list of our Components: Canvas1, Ball1, and Screen1.
Click on Ball1. A list of "Blocks" will appear. By fitting blocks together we make that component "do" things.
With your mouse, grab the when Ball1.EdgeReached block and drag it onto the board.
Next, click Ball1 on the side again. Drag the call Ball1.Bounce block and snap it into when Ball1.EdgeReached
Mouse over the edge button on the when Ball1.EdgeReached block and drag and snap the value edge piece into the call Ball1.Bounce
What is happening on your emulator or device?
Minimize the blocks editor (leave it open in the background) and go back to your component viewer.
Do the following. Each time you make a change, see what happens on your emulator or device.
Interval
Change Ball1's Interval to 500
Change Ball1's Interval to 100
Change Ball1's Interval to 10 (leave it here)
Speed
Change Ball1's Speed to 100
Change Ball1's Speed to 1 (leave it here)
Heading
Change Ball1's Heading to 90
Change Ball1's Heading to 45 (leave it here)
Radius
Change Ball's Radius to 20
Change Ball's Radius to 10 (leave it here)
Mess Around: Change any property of Ball1. Return them to the leave it here value when finished.
Here are some hard things to try to do. If you don't want to try any of these, or are finished
Thinking man's challenge:
After having done all of this, can you imagine a game that might use some of the ideas you learned today? (soccer? what else?)
Some what challenging:
Can you change the color of Ball1?
Can you change the color of Canvas1?
Can you change the shape of Canvas1 to be a rectangle rather than a square?
Can you change the shape of Canvas1 to be the same size as the screen?
Really Challenging:
Can you add another Ball and make it bounce at the same time as Ball1?
Really REALLY SUPER challenging:
Can you make two balls that bounce off walls AND each other?