Use a QR Code reader app, such as QR Droid, and point your camera at this image to link your phone to the app in the Google Play store!
TOO MANY TOTES! Android game written in App Inventor
It’s free – the TOO MANY TOTES! game for Android devices – download at the Google Play Store.
The app was created by student members of the Glencoe High School FIRST Robotics Team #4488 “Shockwave” and was developed using MIT App Inventor. The Android game is inspired by the 2015 FIRST Robotics Competition game called “Recycle Rush”. In the game, robots must stack a variety of container “totes” and a trash can on top and relocate the containers to a recycle zone on the playing field. Students design, build and test their robots – weighing up to about 120 pounds or 55 kilograms – these are large, complex pieces of mechanics, controlled by an advanced system controller, with control software also written by the student team. To learn more about FIRST Robotics, visit the web site at http://usfirst.org
I am one of many volunteer engineering mentors to the Shockwave Team. This year, I was mentor for the applications software team, that has developed a number of Android apps (the game is the only one publicly available), an Excel spreadsheet (written in VBA) to analyze data and develop optimal strategies, plus another app written in Python to process text comments about other robotics teams.
The team’s Android apps are written using MIT App Inventor.
Displaying web pages in your Android apps
Last year, I presented a short tutorial on displaying web pages from inside your App Inventor apps. Now, here is a some what improved version that prompts for a web address URL, checks to see if http:// has been entered, and if not, prepends http:// to the front of the address. Then the web page is displayed.
The Designer View
There is not much to the user interface – a text box to enter the web URL and a button to display the web page. The page then appears below the button, and the content may be scrolled on the screen.
To create this user interface, drag a horizontal layout onto the screen and then add a label for the “Web page URL” prompt, followed by a text box for the data entry. Then add the Display web page button.
From the User Interface section of the Palette, at the left of the Designer screen, drag and drop a WebViewer component on to the design area.
The WebViewer is not a full Internet browser – it is a component that displays the specified web page only. The WebViewer does not support standard browser features, such as saving web page content nor does it provide a history of the web pages visited.
The Blocks Code
Part 2: Sending numeric data using App Inventor Bluetooth communications
Part 1 of this tutorial introduced Bluetooth communications and implemented a simple method of sending text data back and forth between two Android devices over the Bluetooth wireless link. If you are not familiar with using App Inventor’s Bluetooth component, start with Part 1.
In Part 2, a data packet concept is introduced to guide the communications between devices, and is used to send a combination of text and numeric data. This section introduces the concept of binary numbers so that you can understand why we would handle text and numbers in different ways.
This tutorial modifies the user interface of both the client and server programs introduced in Part 1. Then, blocks code is added to send text and numeric data. Numeric data is sent as binary data using special methods of the Bluetooth components.
Related:
Related:
Continue reading Part 2: Sending numeric data using App Inventor Bluetooth communications
Positive comments about MIT App Inventor from i-Programmer
App Inventor is an amazing way to create Android applications. You don’t need to be able to program to use it, but if you can then all the better.
All I can say is that as a programmer this is the first time in quite a while that a development environment and its associated “language” has brought a smile to my face. It’s not perfect, but if you give it a little room to grown on you might just smile as well.
Although App Inventor is sometime described as an educational toy that you can use to get kids interested in programming, don’t let this fool you into thinking that you can’t do real things with it. It makes a very good prototyping facility and a couple of the prototypes that I have created have actually ended up as final apps that are still in use.
via Getting started with MIT App Inventor 2.
I have the same thoughts about App Inventor too. App Inventor is much bigger than a tool for teaching programming.
Blocks Editing Tip: Arranging and collapsing blocks in the editor
As you develop your App Inventor program using the Blocks editor, do you find your blocks overlapping and crashing in to one another on the screen? You know, like this:
You can drag the blocks on the screen so they no longer overlap, but dragging each block is tedious (time consuming). But there is an easy way to automatically re-arrange the blocks.
- Move the mouse pointer to any part of the white space outside the blocks
- On Windows, right-click the mouse button
- On Mac OS X, press Ctrl and click the mouse button
Continue reading Blocks Editing Tip: Arranging and collapsing blocks in the editor
Pevest App Inventor web site now features Google Translate: Translate into many languages!
Interest in MIT App Inventor is growing rapidly, world wide. Many of the readers of this web site do not speak English as their native language.
To help you use the tutorials on this web site, please use the new Google Translate option in the column on the right side of every page. Select your language and this page will be automatically translated.
My native language is English. I speak a little Spanish that I learned when I was much younger, in high school. I expect to begin reviewing Spanish and improving my Spanish skills soon.
Part 1: Basic Bluetooth communications using App Inventor
This tutorial covers basic App Inventor Bluetooth communications code. Subsequent tutorials will add additional features. To implement and test this sample code, you need access to two Android devices – one to act as a Bluetooth “server” and the other to act as a “Bluetooth” client.
I tested this code using an old LG smart phone running Android 2.2 and a new Nexus 5 running Android 5.0.1. I also tested this code using the Nexus 5 paired with a Nexus 7 tablet.
This tutorial is lengthy – it introduces Bluetooth communications, then presents the user interface and blocks code for both the server and client programs, and then discusses how to set up the Bluetooth Communications link using “pairing”.
Downloadable App Inventor source code for the client and server is at the end of this post.
This is the first of several posts on Bluetooth. This first post covers basic connections and the sending and receiving of text between two Bluetooth devices. The two halves of the link – client and server – are kept in separate apps to keep this simple, however, it is possible for a single app to act as both a client and a server. A subsequent post will show how to send other types of data, such as numbers, and introduce additional features for using Bluetooth communications.
Related:
- Part 2: Sending Numeric Data using Bluetooth
- How to connect App Inventor apps to Arduino using Bluetooth
Introduction to Bluetooth
Bluetooth is the communications technology with a funny name.[1] Bluetooth is actually named for a long ago Danish king who worked to unite groups of people, which is similar to Bluetooth’s goal of interconnecting different devices. The King’s real name was “Harald” but he had a nickname that translates as “Bluetooth” – no one knows for sure why he had this nickname but one thought is he had one dark tooth that may have appeared black or blue. And that is certainly an obscure way to choose a name for new technologies!
Bluetooth establishes a very low power, short range (up to 10 meters) communications link between two devices. Bluetooth uses the same frequency band (2.4 Ghz) as Wi-Fi, but uses different technology. Both Bluetooth and Wi-Fi use forms of spread spectrum radio links that result in signals moving around within a wide band in ways that enable sharing of the spectrum by multiple devices. But the two technologies serve different purposes, are not identical, and cannot communicate with one another.
Bluetooth applications include common wireless headsets for wired and cellular phones, and in-ear cordless adapters for phones. Bluetooth is also used by cordless headphones and to exchange address cards between devices, and for industrial applications where sensors collect and send data into a network.
There are two forms of Bluetooth – classic Bluetooth, which we use in the sample applications, and a newer version known as Bluetooth low energy, Bluetooth BLE, Bluetooth LE or Bluetooth Smart – all referring to the same new technology. The newest Android devices running Android 4.3 or newer, usually support the newest Bluetooth Smart technology. Regardless, we use classic Bluetooth which is backwards compatible to older phones, and is the technology supported by App Inventor.
Setting up a Bluetooth devices involves “pairing” the two devices and establishing a connection. This will be covered later in this tutorial.
Footnote:
[1] Actually there is another communications technology with a funny name called TWAIN, which is an acronym for “Technology without and interesting name” (really!)
The Designer View
Continue reading Part 1: Basic Bluetooth communications using App Inventor
MIT App Inventor – now available with Chinese or Spanish Interface
Click the link, above, to learn how to select your desired language for the App Inventor interface.
—-
Separately, Part 1 of my App Inventor Bluetooth tutorial may be published on Friday. Because the tutorial covers a lot, the tutorial will be split into a least two separate blog posts.
I also now have Bluetooth electronic parts to support Bluetooth connection on on my Arduino boards. I intend to use those parts to set up a wireless link between my Android phone and the Arduino – which opens up interesting possibilities such as using the Android phone to remote control an Arduino project.
Arduino is a low cost, simple to program microcontroller board. A microcontroller is a very small computer on a single chip. The Arduino board has a number of input and output pins that can be used to control lights, motors and other devices, and can process incoming electrical signals. For example, the Arduino has an on board Analog to Digital Converter (ADC) that converts input voltages of 0 to 5 volts to a number. I used the ADC feature in a project to measure voltage and current consumed by a particular smart phone, for evaluating the impact that algorithm choice has on battery power consumed and the life of the battery. (An “algorithm” is what we call a set of instructions to perform a certain task. For example, a sorting algorithm is a set of rules to sort values into ascending or descending order.)
With a wireless link between the Arduino and the Android phone, we can have sensors (like temperature, or light intensity) that are measured by the Arduino board, and then send those values to an app running on the Android phone. The phone could then, perhaps, process the external sensor data or collect it and send it on to the Internet.
App Inventor Bluetooth Communication tutorial coming soon
Android phones and tablets support Bluetooth communications (“BT”).
BT is a very low power, very short range communication technology used for connecting earphone and headphone adapters, wireless microphones, and wireless keyboards and mice to computers and tablets.
App Inventor supports BT links and can be used to transmit data back and forth between two Android devices.
When two devices communicate, one device acts as a “server” and the other as a “client”, although either send and receive data.
I now have basic Bluetooth communication working between two Android phones. As I finalize the Bluetooth sample app, I will post a tutorial here on how to set up Bluetooth and how to write apps that use Bluetooth communication.
Longer term, I intend to connect an App Inventor app to an Arduino microcontroller board using the Bluetooth link. I will post information on that once it is available.
(Due to volunteering every evening with a FIRST Robotics team, and a few extra things going on, my updates are a little less frequent at the moment – sorry!)


