From Calculations to Programming
We’ve long since passed the time when a calculator is a simple device for doing basic math. These small teaching tools are, in fact, portable computers every bit as sophisticated as our smart phones. In addition to graphing, analysis and recording the data from lab sensors, TI’s Nspire family of devices adds a way to teach programming by incorporating the versatile Lua language.
Lua is a free scripting language that was created in the 90s in Brazil and means “moon” in Portuguese. It has been used for years to create games like “World of Warcraft” and “Civilization,” but also has the potential to be used to create simple apps for use in school as well as a platform for teaching kids how to program. It has the power to stimulate their creativity along the way.
In addition to a TI Nspire calculator that has the version 3.0 operating system or newer, you’ll need to download and install TI software on a PC to make it work. It takes about 15 minutes to get ready for Lua programming. The TI software for creating Lua programs is only available for the PC, but there are Mac and Linux equivalents online.
The final step is connecting the calculator with the PC to transfer the programs back and forth. You’ll need to use the USB cable and TI’s Student Software that came with the device.
While there are dozens of simple Lua games and teaching aids available to see the potential of teaching programming through the TI Nspire hardware, the best demo is TI’s downloadable Periodic Table program. It not only shows the elements in the classic “U” shaped table of elements with their symbols and atomic number visible, but the elements are color coded by family. Each entry has detailed properties so that kids can explore and graph the trends in properties as you move up-and-down or right-to-left among rows and columns. In other words, it’s a great class lesson in and of itself and should be loaded on any Nspire calculator used in a chemistry class.
The beauty of using Lua is that kids can make their own programs and study the ins and outs of programming. The language may be simple, but is powerful, flexible and what the kids learn can be transferred to their next programming class or project. On the downside, typing in the Lua commands can get tedious, but there’s no better way to learn the fundamentals of programming than from the ground up.
On the downside, there are only a few resources that TI provides for teachers to build class plans around. A full curriculum –whether in print or online – built around this concept would have been a big help, but there’s a host of third party books, tutorials, samples and tips available scattered online at Lua.org, lua-users.org and other sites dedicated to this language.
TI’s program is a bare bones environment for creating programs, but because Lua is text based, you can use anything, from Word to Notepad to write the programs. There’s also the Oclua environment, which lets you program directly on the calculator, although using the system’s tiny alphanumeric keypad is challenging to say the least.
I used an Acer FX desktop PC and an Nspire CX color handheld using version 3.10 of its operating software along with a 14-year old student to write simple scripts for displaying the name of the school and turning two groups of numbers into a linear graph line.
With the fundamentals in hand, kids can now build more complicated and interesting programs. This could lead up to creating games, modeling the orbits of electrons and even for exploring probabilities on the Nspire’s screen.
Writing these apps wasn’t particularly hard, but involves trial and error. I really like the ability to let your imagination run rampant, type the commands and then see if your idea works a few minutes later. On the downside, you need to dedicate both a PC and a fairly expensive calculator to the task, although the projects can be done in teams.
The classroom possibilities of combining Lua programming with the Nspire hardware are seemingly endless. More than fun and games, using the calculator to teach the rudiments of programming lets students not only carryout ideas of their own see the program go from lines of code to actual on-screen action.
Who knows, it might even inspire the next Ray Kurzweil or Steve Jobs.
+ Flexible language for teaching programming
+ Lots of examples available online
+ Wide variety of possible programs
- Requires both Nspire calculator and a PC
- TI software PC only