Loading presentation...

Present Remotely

Send the link below via email or IM


Present to your audience

Start remote presentation

  • Invited audience members will follow you as you navigate and present
  • People invited to a presentation do not need a Prezi account
  • This link expires 10 minutes after you close the presentation
  • A maximum of 30 users can follow your presentation
  • Learn more about this feature in our knowledge base article

Do you really want to delete this prezi?

Neither you, nor the coeditors you shared it with will be able to recover it again.



Using MIT App Inventor

Paul Fuller

on 10 May 2017

Comments (0)

Please log in to add your comment.

Report abuse

Transcript of MIT APPs

App building with MIT APP Inventor
Diagram Overview
copy and paste as needed and take advantage of an infinite canvas!
Use Case
2 balls
2 x clocks
buttons - reset
label- for score

collision - IF balls collide

When edge of screen reached bounce
Faster Button
stop button
Objects - Note the Speed and Interval settings for the 2 balls
purple blocks are procedures you have written.
You need to create a procedure and name it
BEFORE you can "CALL" it
purple blocks are procedures you have written.
You need to create a procedure and name it
BEFORE you can "CALL" it

This is NEW Time block (replaces version on previous slide)...What does the IF Statement do?
You need to have created a new Screen.
At the top
2nd screen just has a "Game Over" image
and a Play again button that loads first screen again.
Code to use the phone's Orientation Sensor

Designer Sceen
Blocks Sceen
1. In Designer Mode: Put a label on the Screen, name it lbl_score
Displaying a Score
Blocks for Components
Moving Balls
in the Designer screen add the components you need.
First is a "canvas" to put the objects on - Set height and width to "fill to Parent" so the canvas is as large as the screen

Speed : 15
Interval: 10
Radius: 20
Speed : 0
Interval: 10
Radius: 20
Your First App-Ball Roll Game
Flick the red ball to try and collide
with the moving black ball
Explanation of "
" and "
". Both values work together to control the actual speed of movement.

-The interval in milliseconds at which the sprite's position is updated. For example, if the interval is 50 and the speed is 10, then the sprite will move 10 pixels every 50 milliseconds.

- The speed at which the sprite moves. The sprite moves this many pixels every interval.

For example, to have a Ball move 4 pixels toward the top of a Canvas every 500 milliseconds (half second), you would set the Speed property to 4 [pixels], the Interval property to 500 [milliseconds], the Heading property to 90 [degrees], and the Enabled property to True. These and its other properties can be changed at any time.
Moving the ball using the Orientation Sensor on the Android device
Need to add Clock and Orientation Sensors from Sensors Category
Clock Object should be renamed as "timer" and interval set to 10ms
2. See below "moveBlackBallwith_Sensor" Create a Procedure that updates the ball's Heading and Speed based on sensor values
3. Code from "timer" so when the clock ticks, every 10ms you can call the procedure you've written in 2. above.

One Clock will be used to update the the ball movement using
the phone's orientation sensor.

The 2nd Clock is used as a Game Timer
When is the "update Score" Procedure called? Look at the Procedure on the right....
Full transcript