To use this file copy and paste this:    // #URL-lib "http://pin1.org/forthlib/flb/Examples/rotary-shed.fth"   into BV Terminal 3 or here to download.

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Rotary encoders Example of using the rotary-shed.flb library // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

// 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 // #URL-lib "http://pin1.org/forthlib/flb/Interupts/interrupt.flb" sid=101 // #URL-lib "http://pin1.org/forthlib/flb/Interupts/b-shed.flb" sid=101 // #URL-lib "http://pin1.org/forthlib/flb/Examples/rotary-shed.flb" sid=101


Full Contents of File

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
// Rotary encoders Example of using the rotary-shed.flb library
//
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

// 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
// #URL-lib "http://pin1.org/forthlib/flb/Interupts/interrupt.flb" sid=101
// #URL-lib "http://pin1.org/forthlib/flb/Interupts/b-shed.flb" sid=101
// #URL-lib "http://pin1.org/forthlib/flb/Examples/rotary-shed.flb" sid=101



// Make sure that the encoder is connected to the same lines that are
// used in the library

: go
    rot-start
    if
        begin
            rotv?  @
            if 
                rotv  @  .
                0  rotv?  !    // for next time
            then
            key?
        until
    else
        cr  ."  cant  add  to  schedule"
    then         
;

// the encoder is being monitored in the backround all of the time so
// other words could check rot? form time to time.
       
// some tools to look at the queue and see the effect of pause, resume
: queuelook  ;
: pauser-pause  ;
: resumer-resume  ;