The Kinoma team is always working on ways to help developers, and has recently published some useful new information.
Two great articles on KinomaJS programming
Our User Experience Architect, Dr. Andy Carle, is teaching the Introduction to Human Computer Interaction course at UC Berkeley this semester (CS160). To get students started on KinomaJS, Andy is writing tutorials on various KinomaJS topics. They’re loaded with step-by-step examples, including sample code, screen captures, and details on how to get around in Kinoma Studio. Even experienced KinomaJS developers can learn some new tricks from these articles. We’ve turned the first two into Tech Notes.
His first article, “Mobile Apps in Kinoma Studio,” teaches the fundamentals of KinomaJS application development. The article addresses how to work with many different UI elements in the MobileFramework, Creations, and Controls modules—including labels, grids, buttons, checkboxes, radio buttons, sliders, switches, and fields. It also covers how to use themes, skins, and styles. The code uses templates—which are a relatively new and still underutilized capability of KinomaJS—making it very straightforward to create reusable UI components. Some of the first apps the students built based on this material were great fun.
Andy’s second Tech Note is “Asynchronous Communication in KinomaJS,” which details the messaging system. KinomaJS uses messages for all kinds of critical purposes including HTTP requests, hardware pin programming, and communication between application modules. A good understanding of messaging is essential to successful KinomaJS programming. This article shows you how to use messages, in particular how to apply results of a message response to the UI of your application.
We wanted KinomaJS development to be accessible to all developers. That’s why we built Kinoma Studio. Many developers prefer to have an IDE rather than have to work from the command line. But there is another group of developers, really good developers, who can’t imagine developing without command line tools. For those developers, we’ve put together kct, Kinoma Create Command Line Tool. This command line tool lets you build, install, launch, and stop KinomaJS apps on Kinoma Create and the Kinoma Create simulator. kct is supported on the same platforms where Kinoma Studio runs: Macintosh and Windows today, with Linux just around the corner (see below!).
The only thing better than really good technical documentation? Working sample code that shows how to do exactly what you need to do. One of our most prolific developers of sample code is Brian Friedkin. He’s posted three more samples this week, each showing how to work with a specific piece of hardware.
1. analog-trimpot uses a classic potentiometer readily available from SparkFun. These knobs are simple to build into your projects. Brian shows you how to hook it up to control the volume level of a video playing on your Kinoma Create.
2. analog-HIH4030 uses the Honeywell humidity sensor and Texas Instruments TMP102 temperature sensor to create a simple environmental conditions display. The example shows how to chain together messages to retrieve synchronized sensor readings—an advanced use of KPR messages going beyond the introduction in Andy’s great article on Asynchronous Communication.
3. serial-7segment-display uses a retro style 7-segment LED display from SparkFun. The example shows how to control the display using a serial connection and how to use the built-in keyboard to enter text to display on the LCD display.
Now, I know what you are thinking, “These sound really cool, and I want to run them now, but I don’t have the hardware components.” Here’s the cool thing: each of these samples includes a hardware simulator. You can run them on your computer using Kinoma Studio right now. You can modify the app or use the BLL to build your own. If you order the components today, by the time they arrive, you’ll have your project coded and working.
Many of our pin simulators were created by Sean Allen, who also happens to be the programmer behind Pin Explorer. Sean has put together a tutorial that walks you through how to build both data driven and customer simulators, complete with exercises at the end to test your new skills. Check out his article in the Kinoma Tech Notes.
The biggest project we’re working on is support for developing on Linux. Many of our developers have reminded us that Kinoma Create is a Linux device, so it makes perfect sense to develop for it using Linux. We agree. This coming Friday February 20th, we’ll post the first preview release of Kinoma Studio for Linux. The Linux version includes all the same capabilities as the Mac and Windows versions, including the Kinoma Create simulator. We’ve focused our development and testing on recent versions of Ubuntu. We’ll provide detailed compatibility notes with the preview release. We are looking forward to your help trying out the preview release on your Linux system, so we can shake out the compatibly issues. There are so many variations of Linux that we can’t do this ourselves, so we are happy to have the support of our community.
Moving forward, our plan is to release Kinoma Studio for Linux builds at the same time we post new builds for Macintosh and Window.
If you’re developing with KinomaJS for Kinoma Create or mobile apps, you should be a regular visitor to the Kinoma Forums. That’s the best place to ask questions and share your knowledge. There’s a growing body of great information and practical experience there. In recent weeks, the forums have been buzzing with questions from the Berkeley CS160 students, especially in the days before their next assignment is due. If you are just getting started with KinomaJS, the struggles and successes of these students are a powerful learning tool.
And a BIG thank you to Will Dimmit, an early Kinoma Create developer, for the many answers he has posted in response to questions on the Kinoma Forum. He is generously sharing his expertise and experience developing with KinomaJS to benefit the community. Check out his forum posts for all kinds of good tips.