HaikuVM - A Java VM for ARDUINO and other micros.

HaikuVM 1.0.5

The Arduino IDE is build with JAVA!
The Processing language builds on the Java language!

But what about programming an Arduino in JAVA?

I'm thinking about something like this JAVA program to let the Arduino LED blink:

package processing.examples._01_Basics;

import static processing.hardware.arduino.cores.arduino.Arduino.*;

 * Haikufy like this:
 *   cd C:\arduino-1.0.5\libraries
 *   C:\haikuVM\bin\haiku -v --Config arduinoIDE C:\haikuVM\examples\src\main\java\processing\examples\_01_Basics\Blink.java
 * Then use your Arduino IDE to upload the generated sketch.
public class Blink {
    // The status LED of the ARDUINO will blink.

    static byte ledPin = 13;            // LED connected to digital pin 13

    public static void setup() {
        pinMode(ledPin, OUTPUT);        // sets the digital pin as output

    public static void loop()           // run over and over again
        digitalWrite(ledPin, HIGH);     // sets the LED on
        delay(1000);                    // waits for a second
        digitalWrite(ledPin, LOW);      // sets the LED off
        delay(1000);                    // waits for a second

This program should be compiled and flashed, to finally run on an Arduino.

Well, this can be done with HaikuVM (see http://haiku-vm.sourceforge.net/)!
It's new, it's free and it's open source. And because its JAVA, you have Threads, a garbage collector and other nice JAVA stuff for free.

HaikuVM integrates with the Arduino IDE. Every time when you haikufy a JAVA program (like e.g. 'Blink.java' see above) it creates or renews an arduino library called HaikuVM in your arduino libraries directory. In addition, it generates an example sketch called HaikuVM for this library. With your Arduino IDE navigate to this sketch, load and upload it. The LED will blink.

Try other examples given in 'C:\haikuVM\examples\src\main\java\processing\examples' and have fun!

HaikuVM 1.4.1

It happened a lot since version 1.0.5. Some highlights:

  • Support for Arduino IDE 1.6.4
  • Support for ArithmeticException
  • More user friendly information during haikufying.
  • New feature for Arduino IDE support: See new configuration arduinoIDEUpload (More ...)
  • Easy JNI support with easy integration of your *.c, *.cpp and *.h files
  • Many bug fixes

FYI: Since version 1.4.0 HaikuVM even runs on the lego RCX 2.0 (also known as the Lego RCX Brick).