Saturday Dec 22, 2012

A Raspberry Pi / JavaFX Electronic Scoreboard Application

As evidenced at the recently completed JavaOne 2012 conference, community excitement towards the Raspberry Pi and its potential as a Java development and deployment platform was readily palpable.  Fast forward three months, Oracle has announced the availability of a JDK 8 (with JavaFX) for Arm Early Access Developer Preview where the reference platform for this release is none other than the Raspberry Pi.

What makes this especially interesting to me is the addition of JavaFX to the Java SE-Embedded 8 platform.  It turns out that at $35US, the (not so) humble Raspberry Pi has a very capable graphics processor, opening up a Pandora's box of graphics applications that could be applied to this beloved device.  As a first step in becoming familiar with just how this works, I decided to dust off a two year old JavaFX scoreboard application, originally written for a Windows laptop, and see how it would run on the Pi.  Low and behold, the application runs unmodified (without even a recompile).

The video that follows shows how an ordinary flat screen TV can be converted into a full screen electronic scoreboard driven by a Raspberry Pi.  The requirements for such a solution are incredibly straightforward: (1) the TV needs access to a power receptacle and (2) it must be within range of a WiFi network in order to receive scoreboard update packets.  The device is so compact and miserly from a power perspective, that we velcro the Pi to the back of the TV and get our power from the TV's USB port. If you can spare a few moments, it just might be worth your while to take a look.



Tuesday Oct 09, 2012

Raspberry Pi and Java SE: A Platform for the Masses

One of the more exciting developments in the embedded systems world has been the announcement and availability of the Raspberry Pi, a very capable computer that is no bigger than a credit card.  At $35 US, initial demand for the device was so significant, that very long back orders quickly ensued. After months of patiently waiting, mine finally arrived. 

Those initial growing pains appear to have been fixed, so availability now should be much more reasonable. At a very high level, here are some of the important specs:

  • Broadcom BCM2835 System on a chip (SoC)
  • ARM1176JZFS, with floating point, running at 700MHz
  • Videocore 4 GPU capable of BluRay quality playback
  • 256Mb RAM
  • 2 USB ports and Ethernet
  • Boots from SD card
  • Linux distributions (e.g. Debian) available

So what's taking place taking place with respect to the Java platform and Raspberry Pi?

  • A Java SE Embedded binary suitable for the Raspberry Pi is available for download (Arm v6/7) here.  Note, this is based on the armel architecture, a variety of Arm designed to support floating point through a compatibility library that operates on more platforms, but can hamper performance.  In order to use this Java SE binary, select the available Debian distribution for your Raspberry Pi.
  • The more recent Raspbian distribution is based on the armhf (hard float) architecture, which provides for more efficient hardware-based floating point operations.  However armhf is not binary compatible with armel.  As of the writing of this blog, Java SE Embedded binaries are not yet publicly available for the armhf-based Raspbian distro, but as mentioned in Henrik Stahl's blog, an armhf release is in the works.
  • As demonstrated at the just-completed JavaOne 2012 San Francisco event, the graphics processing unit inside the Raspberry Pi is very capable indeed, and makes for an excellent candidate for JavaFX.  As such, plans also call for a Pi-optimized version of JavaFX in a future release too.
A thriving community around the Raspberry Pi has developed at light speed, and as evidenced by the packed attendance at Pi-specific sessions at Java One 2012, the interest in Java for this platform is following suit. So stay tuned for more developments...


About

Jim Connors

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today