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

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Here is an example routine for using the BV5205, A to D IC // note that by using currentSID, the BV4205 library is extended // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

// REQUIRES: // #URL-lib "http://pin1.org/forthlib/flb/General/soft1.flb" sid=100 // #URL-lib "http://pin1.org/forthlib/flb/General/pinsel.flb" sid=101 // #URL-Lib "http://pin1.org/forthlib/flb/I2C/i2c.flb" sid=102 // #URL-lib "http://pin1.org/forthlib/flb/I2C/BV4205.flb" sid=103

// CONSTANTS: // none


Full Contents of File

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
// Here is an example routine for using the BV5205, A to D IC
// note that by using currentSID, the BV4205 library is extended
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

// REQUIRES:
// #URL-lib "http://pin1.org/forthlib/flb/General/soft1.flb" sid=100
// #URL-lib "http://pin1.org/forthlib/flb/General/pinsel.flb" sid=101
// #URL-Lib "http://pin1.org/forthlib/flb/I2C/i2c.flb" sid=102
// #URL-lib "http://pin1.org/forthlib/flb/I2C/BV4205.flb" sid=103

// CONSTANTS:
// none

// #currentSID sid=103

// the following will extend the BV4205 library as it has the same sid
// as the current sid is set to
: demo
    66  4205-init  invert  abort"  Can't  initialise  device  using  address  66"
    cr  ."  continually  scanning  10  ports  beginning  at  0"
    1  a6    // enable autoscan
    begin
        key?  abort"  finished"  // get out if user presses a key
        cr  10  0  a7  300  ms          // get 10 readings starting at 0
    again     
;

: <0>godemo  ;  // public word for this file

// #currentSID sid=0