R/C Settings
Overview Search Downloads Submit file Up
Download details
secursw.zip Version:1.0
(0 votes)

This Mix script, called secursw.lua, used the script stick2rate.lua found on the site www,rc-soar.com as a good example of a mix script.  Then I took the idea of the Unknockable Safety Switch by MattyB found on this R/C Settings site and used an Lua mix script to accomplish the same action.  A study of the code will give a good idea of the State Machine needed to step through the various switch positions.

A three position switch is used to create a two position output switch.  The three position switch must be moved through a set sequence in a limited time for the state of the output to change.  Thus it would be very difficult to bump the switch causing an inadvertant change of output state.

The sequence starts with the switch "Up".  It is moved to "Centre", then "Down" then back to "Centre" before a timeout to make the output change state.  To change the state back, move the switch to "Down", then to "Centre", then back to "Up", again before a timeout.

The script output is available as value useable for a Logic Switch decision or something else you can think of.




Data

Size 1.76 KB
Downloads 1641
Created 2016-10-29
Created by boomerwing
Changed at 2016-12-27
Modified by boomerwing

View Model Details

Download

You have no rights to post comments