D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] Pi Output Box

 

On Sat, 2 Jun 2012, Peter Lloyd-Jones wrote:

On 2 June 2012 09:46, Gordon Henderson <gordon+lug@xxxxxxxxxx> wrote:

My stuffs at: https://projects.drogon.net/raspberry-pi/wiringpi/ but I'm
in the middle (as in right now; well this morning!) of making some changes,
etc.



Thanks Gordon, you have given me more than enough to be getting on with!  I
hope I will make some progress.  What will be a challenge will  be getting
at the port from JMRI, but first lets get the thing running.  (BTW some of
our users have got JMRI running, but say it is slow).

http://jmri.org/

Thanks again, you have given me a good start.

I think there are some folks on the IRC channel using/working on JMRI - Ah. it's Java. That's possibly why it's somewaht sub-optimal...

My wiringPi stuff includes a command-line tool that lets you control the GPIO - highly frowned upon by some of the purists, but I imagine the rate of calls will be low and if you can call a script from Java then you can poke IO.. It works like this:

# Set pins 1 and 2 to outputs

  gpio mode 1 out
  gpio mode 2 out

# Set 1 and 2 on, wait, then set them off

  gpio write 1 1
  gpio write 2 1
  sleep 1
  gpio write 1 0
  gpio write 2 0

so it's hugely innefficient, but it's great for doing basic testing. (IMO!)

Gordon

--
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/listfaq