App Inventor

App

Helloooooo! We are so close to the end of the year, so, I've got one last thing to show you!

An app!!! Yes, the final thing we are working on this year is coding! There are different programs in this app, so I will be splitting this page into 4 Sections. Enjoy! One more thing, if you scan this QR code with the app "Mit App Inventor" You can go to my app! (I'm sorry but sadly this doesn't work with Iphones ): (5\16\24) 

Hello Codi!

This app was the easiest and took the least time to make, so that's why this section is so short. This is the first app we learned about so I will show you the code, the app screen, and then explain it. What happens is, the pig is a button, and I have coded it to make an oink sound. That's it! Simple right!

Talk to me

This is the second program we worked on, talk to me. This app has whatever you type said! But enough talking, lets explain how it works. There is a textbox, a button, and a accelerometer sensor. When there is something in the text box and you click the button, the hidden text to speech component activates and says whatever is in the text box. I also made it to where if you shake the device, the text to speech component Rick Rolls you using the accelerometer sensor. When you shake the phone, the accelerometer sensor goes off, triggering that message to play.

Ball Bounce

In ball bounce, A ball bounces. Kinda self explanatory. You know the drill by now, so let me explain the code. At this point I would also like to explain that the UI you are seeing, or the phone screen, isn't exactly what it would look like if you ran the app on your phone. So if it looks a bit weird, that is why. But as you can see from this perspective, there is a new component! The component in the center (Which is not visible when you are running the app), is the canvas! The canvas can be used for a lot of things, something you will see later, and for this we are using it for the ball! When you touch the ball and "fling it", code will start to run. This code will tell the program to get speed for the ball, and the speed to go in the direction of where you flung it.

Paint Pot

This is the last app that we worked on, and it is by far the biggest app. As you can see, there is  a lot of code. I will do my best to explain how it works, but it might not be the best explanation. You draw in this program, making the only limit being how many colors you have. Let's start with drawing in the first place. That was one of the simple things in this program, as all you have to do is make it to where when you drag the finger along the canvas, the canvas makes a line at all of the past, and present coordinates of where you dragged, making a line based off of those coordinates. We do the same thing when you tap something, but instead of being a line, it will be a circle. Lets move our focus to the color buttons. These buttons are programed to change the color of the line by clicking it, and also by using the text to speech component we used in talk to me, we can make the button say what color it is when you click it. When you draw, the line is very thin so you can't do much. That's why I added a slider; the slider is corresponding with the line and dot thickness! There is one more button I would like to show you, and that is the clear button! This button, with a warning, will clear your canvas so you can start over for something brand new. But lets talk about the warning. When the button is clicked, a menu pops up, asking if you are sure that you want to clear your work. We need this as I don't want you accidentally clearing your work. If you press yes, code runs to clear your canvas. But if you press no, it closes the menu.