jeudi 11 septembre 2014

LaBonne PI control : JAVA IS GO

Happy days are here : having resigned myself to writing the code in python, I have discovered that there is now an official JAVA7 port for the Raspberry PI!

See : http://electronicdesign.com/embedded/coffee-dessert-java-and-raspberry-pi
> sudo apt-get update
> sudo apt-get install oracle-java7-jdk

And a nice GPIO, I2C etc  java lib to interface it:
http://pi4j.com/example/control.html
A good set of functions, although it has some strange GPIO pin labeling (maybe from the first pi version pinout? or related to labeling from wiringPI vis-a-vis the Ardino pinouts?)

So, dust off some code, and we've got a Jetty based http server running some servlets, to do basic management control, java alarms, logs, sql access etc. Add in a servlet to map the labonne specific hardware  layout and create some basic actions... and it shakes/nods its head via a web service, delivers the current temp/humidity, turns on/off the relays...
Need to add some hardware for some LEDs (driven from the PWM controller to get brightness control)

Just finding the java so much easier to deal with...

Now looking to get the audio working (stero mikes to track the speaker, record and play utterences, process simple voice reco), and the camera to snapshot.
Then a nice rule based interpreter/GUI config system to tie it together.

Aucun commentaire: