Dennis Ritchie, the creator of the C programming language and co-developer of the Unix operating system passed away on October 8 at the age of 70, leaving a legacy that casts a very long shadow.
Wow! I just checked the web server data and the server estimate the http://appinventor.pevest.com web site is now read in 183 countries!
Using the United Nation’s count of 241 countries and territories, that means residents of 58 countries and territories have not visited yet!
But that means people in up to 183 countries are learning how to program Android apps using MIT App Inventor!
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.
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.
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.
Clark Hochgraf has a blog post on using button controls as a simple way to draw a column chart. This is a clever idea. I created a sample program to illustrate the idea in a bit more depth, with multiple columns.
User Interface View
Let us look at our sample program’s user interface. The screen displays a colorful column chart – but those columns are actually buttons stretched vertically.
Our demo app displays two kinds of column chart features. The first is that columns 1 through 5 are drawn based on the data values (separated by spaces) entered in the text box, at top, followed by pressing the Draw Chart With Data button.
The sixth column (labeled imaginatively “6”!) is controlled by the Slider control. Adjust the control to the left, and column 6 becomes shorter; adjust to the right and column 6 becomes taller. That idea was shown in Clark Hochgraf’s example too.
We set up our app by creating a horizontal layout, at top, for a label (“Data (5 values):”) and a text box for data entry. Next, we add a button and label it “Draw Chart With Data”.
Bluetooth is a standard for low power communications, over very short distances, at modest data rates. Originally, Bluetooth was intended for applications such as short range cordless phones, wireless headphones, remote control units and other types of devices.
That original version is known as Bluetooth Classic. I wrote a popular tutorial on using Bluetooth Classic in MIT App Inventor apps for Android. Please refer to that tutorial to learn more about the history of Bluetooth and how to write MIT App Inventor apps to use classic Bluetooth with an Arduino board. (Above links were broken until 11 October 2016, since fixed.)
Bluetooth LE Support and The Internet of Things
In 2016, MIT introduced support for Bluetooth Low Energy or Bluetooth LE or just BLE. Bluetooth LE is a version of Bluetooth designed for devices that send data occasionally and where battery life must be measured in weeks to months or longer.
Bluetooth LE is one of several wireless communications standards used for Internet of Things (IoT) connected devices. IoT refers to adding computing and communications to a wide variety of devices, sensors and control systems that were previously mostly “dumb” and not connected to much else.