Category Archives: Components

Google will be discontinuing Google Fusion Tables at end of 2019

Google created a cloud-based data base system called Fusion Tables. Later, support for Fusion Tables was added to App Inventor.

If you have used Fusion Tables, you will need to update the code to use a new data base system. You might also consider third-party App Inventor-based development systems such as Appy Builder.

Google has sent out an email advising Fusion Tables users that they will be discontinuing Fusion Tables – literally, the database service will go away on 3 December 2019.

Unfortunately, there is not yet a great alternative database for App Inventor apps other than to switch to Appy Builder.

Hello,

Google Fusion Tables  was launched almost nine years ago as a research project in Google Labs, later evolving into an experimental product. For a long time, it was one of the few free tools for easily visualizing large datasets, especially on a map. Since then, Google has developed several alternatives, providing deeper experiences in more specialized domains.

In order to continue focusing our efforts in these areas, we will be retiring Fusion Tables. We plan to turn down Fusion Tables and the   Fusion Tables API  on December 3, 2019. Embedded Fusion Tables visualizations — maps, charts, tables and cards — will also stop working that day. Maps using the  Fusion Tables Layer  in the Maps JavaScript API v3.37 will start to see errors in August 2019.

Here are some next steps to consider:

Learn about alternative tools

Several new Google tools have been developed over the years, and we encourage you to visit the  Help Center  to learn which ones fit your use-case.

Teams at Google have developed internal tools that can create   powerful map visualizations. We are working to make some of these tools publicly available and will have more to share in the coming months—sign up    to stay in touch.

Download your data    

Filter by  “type:table”  to pull up a list of your tables in Google Drive. Download data from an individual table by following  these instructions. If you have a lot of tables, we will make it easy to download all your data in one step via   Google Takeout   starting in March 2019.

Thank you for supporting Fusion Tables over the years. If you have feedback, visit the Fusion Tables Help Forum.

Part 1: Storing and accessing user interface components as variables

App Inventor programmers routinely store values, such as numbers or text strings (“Hello!”) in variables. For example,

stores the numeric value 6 in to the variable TOTALBUTTONS.

To illustrate by example, here is a global variable named SpecialButton. We can initialize it to anything we want at this point.

Next, inside our app, our blocks code assigns Button1 to the variable SpecialButton. SpecialButton now holds a reference to the actual user interface control Button1.

Since SpecialButton is a variable and not an actual button, we cannot directly use a SpecialButton.Click handler but we can use a feature of App Inventor to do the same thing in a different way. We will see how to do this in this a bit later.

You can store any App Inventor components – a Clock, a Bluetooth device – any component, in a variable.

Why would you want to do that? We will see in the example in this lesson.

This tutorial is in both written form and as an online video.

Continue reading Part 1: Storing and accessing user interface components as variables

Part 3: Bluetooth communications with 2 Arduino devices, using App Inventor

Please start with “Part 1: Basic Bluetooth communications using App Inventor” to learn how to configure, set up and program an App Inventor app that communicates over Bluetooth between two Android devices. Then, read “How to connect App Inventor apps to Arduino using Bluetooth” before going through this tutorial!

Then continue with this tutorial.

This tutorial shows how an App Inventor app can communicate with 2 (or more) Arduino boards and Bluetooth devices simultaneously. These instructions assume you are familiar with the code and hardware presented in Part 1 and Part 2 and How to connect App Inventor apps to Arduino using Bluetooth“. This tutorial uses the same Arduino source code as in that tutorial.

A follow up tutorial will show how to simplify some of this code for supporting multiple Bluetooth devices.

Brief Reminder

Bluetooth is a short range, low power, limited speed wireless communications technology. The original Bluetooth technology provided a serial communications link between two paired devices (as compared to an individual data packet sent between up to n devices using the much newer Bluetooth LE – see here and here for information on Bluetooth LE).

Arduino is a microcontroller board for building hardware projects. You can write software for Arduino using a programming language similar to the C++ programming language.

The code used in these examples has been tested with some specific Bluetooth modules connected to Arduino. These include the JY-MCU (Amazon (Prime), Amazon (non-Prime) and also some HC-05 and HC-06 based Bluetooth modules.

Getting Started

  • Read the prior tutorials (Part 1 and Part 2 and How to connect App Inventor apps to Arduino using Bluetooth“)
  • Build two Arduino boards each with an appropriate Bluetooth module as described in the prior tutorial.
  • Compile and load the Arduino software in to each of the Arduino boards.
  • Test and confirm that your basic LED lights flash for the original, single Bluetooth connection case.
  • Then, with two working boards, continue to this tutorial.

User Interface View

The original app supported just one device, so there was just a single “Connect” and “Disconnect” button. This version demonstrates how to connect more than one Bluetooth device so we need separate buttons for each device. Similarly, we must add a second status and data sending item to the screen:

 

Before running this app, be sure to use Android | Settings | Bluetooth to “pair” your Bluetooth devices with Android.

Then, run the app and select Connect to Device 1. This displays a list of available Bluetooth devices in the vicinity. Select your specific Bluetooth device for the connection. Do this for both Bluetooth devices.

Once connected, you can send some simple commands to the Arduino board. Commands are very simple – a single number – to tell the Arduino to do something (this confirms that the Bluetooth link is working). If we enter a single digit 1 and then press Send Numeric 1, the Arduino board will send back 2 bytes of data which will then be displayed on the app screen. If we enter a single digit 4 and then press Send Numeric 1, a value of 4 is transmitted over Bluetooth to the Arduino board, which responds by flashing the externally connected LED.

Because the text box for data entry has its property set to NumbersOnly, a pop up numeric keypad displays when entering data, rather than the usual Android text keyboard.

Video Demonstration this App

I created a short video showing this app in operation. There are two versions of the video – one is standard 2D format and the other is in VR 3D format for viewing on Google Cardboard-like viewers used with smart phones to watch VR videos.

2D (normal) version: https://youtu.be/BU2gIAxbY_o

VR 3D SBS version: https://www.youtube.com/watch?v=UJIggzZgld4

That version is in 3D, for viewing with VR 3D viewers or 3D TVs or monitors.

Continue reading Part 3: Bluetooth communications with 2 Arduino devices, using App Inventor

Using the Pedometer in MIT App Inventor

The pedometer uses the phones motion sensors (accelerometers) to identify when the phone (or tablet) is being carried by someone that is walking – and uses this to measure the number of steps you take as you walk. When calibrated to the length of your stride, the pedometer provides a way to estimate the distance you have traveled.

The pedometer is so simple to use, I put this example together while eating lunch today.

User Interface

This is a simple program!

To use this app, enter your stride length in meters. For illustration, I set the stride length to 1/2 meter or 0.5, as seen in this screen shot:

Screenshot_20161206-153814

Press the Start measuring steps button to activate the pedometer and then start walking with your phone. You will soon see the Elapsed distance value increase as you move around.

Designer View

Continue reading Using the Pedometer in MIT App Inventor

Does your device support Bluetooth LE? Here is how to find out.

See Part 0 for a brief introduction to this series and Bluetooth LE plus our past tutorial series on classic Bluetooth for communicating between Android devices, and between an Android device and an Arduino board with external Bluetooth transceiver.

Note – Bluetooth LE was introduced in the Bluetooth 4.0 specification. As of this writing, the latest version of the specification is 4.2. Bluetooth LE introduced capabilities to support very low power, battery operated devices that are designed to operate for weeks to months on a single battery or battery charge

Does Your Device Support Bluetooth LE?

To find out if your smart phone or tablet can work with Bluetooth LE: Go to the Google Play store and install the free app “BLE Checker” on your Android device. The app is simple – it tells you whether your device supports Bluetooth LE or not and that is all it does.

Devices that support Bluetooth LE will support BLE connections between compatible devices. However, this app does not tell you if your device supports a special BLE feature called “advertisements”. You can use Bluetooth LE without the “advertisements” feature but you will not be able to use all BLE features.

Continue reading Does your device support Bluetooth LE? Here is how to find out.

Using buttons to simulate a bar chart in App Inventor Code

Our prior post showed how to use user interface button components to simulate a column chart.

We can apply the same trick to create a bar chart. In a bar chart, the data is represented as horizontal bars, whereas in the column chart, the data appears in vertical columns.

Implementing the bar chart requires just a few minimal changes to the original column chart app.

User Interface

This screen shows the basic output, with the data represented as horizontal bars in the chart. To simplify, the slider control and column #6 that appeared in the original column chart version, have been removed.

Screenshot_20161011-134517

A new feature has been added, as an example illustration. Since each bar in the chart is actually a button, you can press on the bar. For fun, a Click event handler has been added to bar #1 in the chart. Pressing bar #1 causes the bar to change to a randomly selected color. This feature has been implemented only for bar #1, but if you wish, you can add Click event handlers for the other buttons.

Continue reading Using buttons to simulate a bar chart in App Inventor Code