Jump to content
 

boc

Members
  • Posts

    17
  • Joined

  • Last visited

boc's Achievements

1

Reputation

  1. Just to clarify - I've only used the sensor inputs with my setup with the JMRI scripts to get rudimentary automation go forwards at 10% speed until left hand sensor is triggered. wait for 5 seconds go backwards at 10% speed until right hand sensor is triggered. wait for 5 seconds. repeat. I'd like to try block detection too and plan to use some optical sensors. I'm in no rush so I'm waiting to order some from China at 25% of what I'd pay in the UK when I next order some other components. If I get the time I may continue to experiment using buttons instead to at least simulate the optical sensors and carry on learning how to use JMRI.
  2. I have lost my reply three times tonight, so coupled with my love-hate relationship with BBC's The Apprentice I am becoming quite grumpy! Are you familiar with arduinos? Rather than retype everything in overview and detail, I'll keep it brief and elaborate if this is an avenue you wanted to go down. I planned to write up my experiences for the forum at a later stage. I am using an arduino to read the state of sensors and feed this into JMRI. I'm also using it to respond to commands from JMRI too, in lieu of a DCC accessory decoder - controlling a point and some lights. A CMRI library exists which outlines how the arduino needs to communicate with JMRI. The only programming required is to define what 'sensors' are connected and how to respond to a state change eg if button 1 is on tell JMRI that CMRI address 1 is on. You could, if you so wished, program more complicated conditions eg if button 1 is pressed tell JMRI that address 1 is on, then wait 5 secs and tell JMR that address 1 is off. I believe you could achieve something similar by scripting or using conditions within JMRI too. Although I already owned it, the arduino cost around £10. which isn't bad considering I could connect 10-13 sensor inputs as a trial. Arduinos or equivalent microprocessors can be bought/built for much less or there are alternative means of expanding the numbers of inputs, so the cost per input (not including sensor itself) could be reduced significantly. I'm unable to include links or copy and paste, as this keeps crashing my messages, but googling 'utrania CMRI', 'ArduinoCMRI' and the posts on this forum about the arduino servo point control (for details on arduinos rather than JMRI) maybe of interest. Chris
  3. I'm not sure about the recording of scripts, but you might be interested in some of the python script examples If you try the back and forth example, which you can find here, http://jmri.org/jython/BackAndForth.py, or in the example folders of your jmri install it might give a flavour of how the script works. When you run the script two sensors will be created in the sensor table and these can be used to test the change of direction. If you can decipher the python code, you may be able to remove the sensor references and have it work as you describe Start forward at speed x Wait for x secs Stop Wait for x secs Start backwards speed x Wait for x secs Stop Repeat Chris
  4. Hi, I'm experimenting with JMRI using a SPROG 3 for dcc output and an arduino for CMRI in/output. I appreciate that my way of doing things is not the simplest but it enables me to play with jmri and have physical stuff respond. Having used JMRi for a few minutes here and there, I'm getting used to the terminology and nuances. I've only got as far as an automated (using scripting) back and forth track with a point that is unconnected to this track. I want to experiment more with sensors in due course. Good luck with your efforts Chris
  5. They look to me like the Caesar British Army models. The soldier with the arm out gives it away. http://www.plasticsoldierreview.com/Review.aspx?id=2121 Boc
×
×
  • Create New...