To use this file copy and paste this: // #URL-lib "http://pin1.org/forthlib/flb/Examples/rotary2.fth" into BV Terminal 3 or here to download.
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Rotary encoders 2 // This version does not use interrupts and culd be easily // used as a library for other projects. // This is an alternative to Rotary.fth, it possibly works // slightly better, uses a pattern to detect direction rather // then detent // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
// REQUIRES: // #URL-lib "http://pin1.org/forthlib/flb/General/soft1.flb" sid=99 // #URL-lib "http://pin1.org/forthlib/flb/General/pinsel.flb" sid=100
// CONSTANTS: // define the three wires used for the encoder 25 constant line1 26 constant line2 6 constant pushb // integer ra integer rb integer det integer rch
Full Contents of File
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *