/* jquery */ /* jquery accordion style*/ /* jquery init */

19 April 2014

Raspberry Pi JavaScript with Nashorn and Java 8

Would you like to write programs on your Raspberry Pi using the popular JavaScript language?

Well you can. Oracle's latest Java 8 release has a built-in JavaScript engine, known as Nashorn.

Here are a few of Nashorn's capabilities:
• run standalone JavaScript programs (no web server required)
• run JavaScript interactively from the command line
• access the complete Java library
• interoperate with existing Java code and APIs
• enjoy high runtime performance from the Rhino-based technology

That's a powerful feature set. For example, you could hack a Minecraft Pi Edition game in JavaScript by calling the functions defined in Mojang's Java API.

Oracle's technetwork site has an informative how to use Nashorn article. There's loads of code examples plus details of using the jjs command line tool, embedding JavaScript commands in Java programs and how to interact with JSON.

Benjamin Winterberg's blog post is another useful source in information.

The official Nashorn scripting reference documention is hosted on the Oracle docs website.

Visit my Raspberry Pi page for news, reviews, advice and tutorials.

9 April 2014

Raspberry Pi Hardware Announcement

On Monday the Raspberry Pi Foundation announced a new hardware initiative.

The Raspberry Pi Compute Module contains the guts of a Raspberry Pi in a brand new format. In essence it offers just the brains, including the Broadcom BCM2835 system-on-a-chip (SoC), along with 512MB of RAM and 4GB eMMC flash storage.

The design is implemented on a DDR2 SO-DIMM laptop memory model format. This means it's only 68mm x 30mm in size. In addition it connects to the host circuit board through an industry standard SODIMM connector (although the pin assignments on the board are completely different from a memory DIMM).

As with the original Pi, these chips are all soldered to the host board, so they can't be upgraded (check out Adafruit's Compute Module blog post for more images).

DIY Hardware Hacking

The whole point of the Pi Compute Module is to entice hardware hobbyists and device builders to create their own printed circuit boards (PCBs). The small footprint and standardised connector immediately opens up a host of opportunities for low cost DIY projects.

As Eben Upton admitted, "Currently, you need a significant amount of space to accommodate the PI inside a product, and a wiring loom to connection the various ports on the board." Upton went on to say this had now changed because, "The Compute Module lets you accomplish this in a smaller space, with all signals routed on the carrier PCB."

Design Freedom

So what does this mean for hardware hackers? Well, they have much more freedom. The host circuit board can be specifically designed for each individual project.

Need six USB ports, or none at all? No problem. After four camera ports? Go right ahead. Want to interface to a proprietary IO connector or host wi-fi, bluetooth and NFC wireless chips? It's all possible.

Robotic driving and flying vehicles can be sleeker. Portable computing devices can be lighter. And operational power requirements are largely in the hands of the designer.

Who knows what might emerge. Could we see a range of Pi-powered laptops? Maybe even a Pi smartphone? The possibilities are endless.

Visit my Raspberry Pi page for news, reviews, advice and tutorials.

3 April 2014

Raspberry Pi-Friendly Java Code Editors

Oracle's Java 8 has a number of new features to excite Raspberry Pi owners, as I mentioned in my Oracle Java 8 for Raspberry Pi post.

However, you'll still need a good code editor. Unfortunately some of the traditional Java IDEs (for example Eclipse and Netbeans) are large, memory-hogging applications.

In the posts below I describe a few Pi-friendly alternatives:

Raspberry Pi Java with Geany
Raspberry Pi Java with Dr Java
Raspberry Pi Java with Greenfoot
Raspberry Pi Java with BlueJ
Raspberry Pi BlueJ Learning Videos
Raspberry Pi Minecraft with BlueJ

Visit my Raspberry Pi page for news, reviews, advice and tutorials.

Appcelerator Titanium Development

Creating even simple desktop applications usually requires significant development expertise and knowledge.

Creating applications for mobile phone platforms is typically even more complex, often requiring developers to understand and use numerous platform-specific tools and languages.

Wouldn't it be great to create useful desktop and mobile applications with just a few HTML statements and a little JavaScript? Well, not only is this possible, but your creation can be packaged as native application for the most popular desktop or mobile platforms.

Sound interesting? Well, in this series of posts I'll explain what Titanium from Appcelerator is all about and how it's able to create native look-and-feel desktop and mobile applications using straightforward HTML, CSS and JavaScript skills.

• The Platform
WebKit Engine
Getting Started
Mobile SDKs
Titanium API
Kitchen Sink App
Mobile App Testing