Speaking with Arduino from Scala

Is there a standard way to control Arduino from Scala? If not, I'm interested in hacking one, but I'm not sure where I should start. The Firmata library looked like a way, but there is no Java or Scala interface. SPDE supports processing pretty well, but I don't see any Arduino function there. I also have a few snippets of Java ↔ Arduino example code, deleted from the Arduino playground and other sources, but nothing exhaustive.

If anyone knows about Scala or direct Java (I can just wrap it in Scala) to do this, or have suggestions for rolling my own interface, I'd love to hear about it.

Thank.

+5
source share
2 answers

Any programming language can be used for communication between serial ports of a PC and arduino, if programs running on both sides can facilitate the exchange of data. RxTX is a Java library for serial communication. Hope this helps.

+3
source

You might want to check out apache MINA, which provides some nice wrapper around the RXTX libraries and offers an idiomatic Scala-friendly API.

I already had some success with this approach when controlling the X10 controller for home automation.

+3
source

All Articles