Showing posts with label serialport. Show all posts
Showing posts with label serialport. Show all posts

Tuesday, January 22, 2013

Yes I'm still working on stuff....

Jruby, why you so silly.....

I'll keep this simple. In my attempts to use jruby on my freshly installed windows system to communicate with the msp430 over serial, I ran into an issue. Jruby didn't want to run even though it ran fine on my previous install. This was of course an updated version and from searching and reading, I wasn't the only one.  I didn't seem to find a solution to my problem(at least one that didn't involve dling and installing the jdk which I didn't want to do at the time), and in fact had to find the solution on my own.

The Problem: jruby doesn't want to run my .rb files, instead it complains about the lack of a path in JAVA_HOME.
The full error: "Cannot locate Java installation, specified by JAVA_HOME:"
Observation: 
  • jruby -v seems to work fine...
  • jruby myfile.rb doesn't work(fails in IDE as well). 
  • jruby --help works...hmmm...?
  • jruby -v myfile.rb works....really??
So do I need to pass a param to get it to work? Yup!
I don't want to pass something silly like -v every time I want to run a ruby script so the next best thing is to force the version by using --1.9
So "jruby --1.9 myfile.rb" works.

Annoying, yes, but solves at least one of my problems....next, get serialport gem working on the windows side if possible...
I'm still fairly new to using jruby, so maybe this is something that I'm just not familiar with...

EDIT:
After further investigating changing the following values appears to resolve most of the other issues I was running into.
Remove JAVA_HOME env variable completely
set JAVACMD to use c:\jruby-1.7.2\jre\bin\java.exe

Monday, May 21, 2012

Garden project update 2 and 3 - Watering system 1


Early prototype of my gravity fed watering system. The valve is electronically controlled and currently is working with my test setup. Next will be to integrate it with the sensor monitoring system and have it actuate based on the current data being read in. I have an event that I'll be displaying a working(mostly) version tomorrow morning, so this evening will be filled with testing the logic and trying to get this in a mostly working form. All of the parts are there...and each works independently....


This is a wired up setup that I brought to the Pasadena engineering and Science expo. Unfortunately I didn't get the sensor (PCB)boards in time(they arrived in the post today)so I had to leave the sensor circuit in the breadboarded setup(which means lots of wires that make it look blah). I'm still using the Launchpad dev board until I can get the wireless setup buttoned down. Once I have it finalized, I'll be able to develop a circuit board that integrates all components in a nice clean fashion. The exciting part of this project was finishing some of the code that uses the sensor data to trigger the on/off switch that lets the water flow. I have to fine tune it at this point but the main part/point of the project is working.

Thursday, April 19, 2012

Garden Project update 1.

2 of three sensors working and data displayed to lcd panel. Wired up prototype showing 1 setup that I'm using for local debugging. With the lcd panel connected this works great, but this isn't an ideal setup if I want to keep source code down as it eats up quite a bit with formatting the layout of data. I have a few ideas of how I can get around this issue, one being offloading all layout to another setup( some sort of connecter like an audio plug to hook up both the data reader and transmitter.)

Wednesday, January 11, 2012

Garden Project Initial notes from a while back.

From a Project a while back

First test if the remote setup using wireless transceiver and solar panel(out of pic) This is only transmitting one of the data points to see how well the data gets through at the range and low voltage. This should get some interesting data as it will be in direct sunlight which should show a steeper evap curve. we'll see what the data looks like this eve!




Some Data at the time...
This is a side by side comparison of two data sets. The first was posted on Monday and the second is from some testing on Tuesday morning. The second set shows the cleaned up data with less noise thanks to a simple fix in the hw setup. As you can see, it cleaned things up quite nicely. The data set also shows the low moisture level of the soil, then the addition of water. The second slight bump in the level was when I added s bit more water...the readings are at a 2 second interval and this shows 1000 total readings.