PLTW Activity 1.2.3 Creating Mobile Apps Walkthrough/Answers

October 6th, 2016


This is a walkthrough/how-to for Activity 1.2.3 Creating Mobile Apps.

This requires you to have done the steps shown here first: https://www.joeybabcock.me/blog/pltw/pltw-activity-1-2-2-introducing-app-inventor-walkthrough/

Go to “Blocks” on the top right corner.

block-editor

Now go back to “designer” and under “layout”, drag an accelerometer to  the screen. It will appear under “non visible components”.

dnhmtr

Back in “Blocks”, click on “AccelerometerSensor1” and drag a “when AccelerometerSensor1 AccelerationChanged” block onto your viewer.

accelerclickometer

Next, drag three “set ” blocks from the “Variables” menu.

drag-set-colors

Drag them onto the “AccelerationChanged” block.

accelerometerchanged

Change the option to red,green, and blue respectively. Next click on accelerometer and drag a “AccelerometerSensor1 . XAccel” next to red, and duplicate it 3 times. Change the XAccel to Yaccel for green, and ZAccel for blue.

flooroption

Next, drag a “Floor” block from the “Math” section next to the “Set” blocks.

add10

After, add an addition block, also from the math section.

block-wirth-addition

Add a number block from the math section, and enter the number “10”. this is because -10 is the lowest number you will get, but you can’t have a negative color.

multiplyblock

Add a multiplication block from the math section, and drag it to the sensor block.

setthumbpositions

Have it multiply the accelerometer value by 25 using the multiply block, and a number block. This is so that the max value we will receive is 250(10*25).

finaldesignerlook

Finally, drag the sliders below the canvas since we no longer need them.

You should be done.

 

 


Comments

Comments Are Not Yet Implemented.