fe-lib-pk10-node

1.0.34 • Public • Published

fe-lib-pk10-node

Nodejs library to control lottery machine

  1. npm install
  2. node index.backup.js [targetIP] [targetMCUDesignType] [loop]

How to setup

  1. npm install fe-lib-pk10-node
  2. npm install node-loader (https://www.npmjs.com/package/node-loader)
  3. add
    {
        test: /\.node$/,
        use: 'node-loader'
    }
    to webpack.config.js in module -> rules
  4. npm i -D electron-rebuild
  5. run -------------> ./node_modules/.bin/electron-rebuild <--------------- (4-5 ref: https://github.com/serialport/node-serialport/issues/1910)
  6. set -------------> app.allowRendererProcessReuse = false; <--------------- in main

How to Use the library in electron

    import PK10Control from 'fe-lib-pk10-node'

    var pk10Control = new PK10Control
    setInterval(pk10Control.execute, 0)
    pk10Control.checkStatus()

    var listenerPK10 = function listenerPK10(ball1, ball2, ball3, ball4, ball5, ball6, ball7, ball8, ball9, ball10) {
        console.log(ball1);
        console.log(ball2);
        console.log(ball3);
        console.log(ball4);
        console.log(ball5);
        console.log(ball6);
        console.log(ball7);
        console.log(ball8);
        console.log(ball9);
        console.log(ball10);
    }
    pk10Control.eventEmitter.addListener('receive_balls', listenerPK10)

Readme

Keywords

none

Package Sidebar

Install

npm i fe-lib-pk10-node

Weekly Downloads

1

Version

1.0.34

License

ISC

Unpacked Size

13.7 kB

Total Files

4

Last publish

Collaborators

  • felixtse