Giter Site home page Giter Site logo

Reading from a keyboard? about t2-start HOT 10 OPEN

danawoodman avatar danawoodman commented on September 14, 2024
Reading from a keyboard?

from t2-start.

Comments (10)

HipsterBrown avatar HipsterBrown commented on September 14, 2024 1

@danawoodman No. If you install version 0.5.4 (npm install [email protected]) then you can use it now. Otherwise, yes, you will need to wait.

from t2-start.

HipsterBrown avatar HipsterBrown commented on September 14, 2024

Yes, you should be able to use something like node-hid to read data events from the USB stack .

from t2-start.

danawoodman avatar danawoodman commented on September 14, 2024

@HipsterBrown thanks! Does node-hid support the tessel platform?

from t2-start.

HipsterBrown avatar HipsterBrown commented on September 14, 2024

Yes, we have compiled binaries for the native dependencies of node-hid version 0.5.4 to work on Tessel's architecture (mipsel).

I can push compiled binaries for the latest release of node-hid (v0.7.2) sometime this week.

from t2-start.

danawoodman avatar danawoodman commented on September 14, 2024

@HipsterBrown thanks, does that mean I have to wait to use node-hid until that binary is released?

from t2-start.

danawoodman avatar danawoodman commented on September 14, 2024

I installed that version and setup their "hello world":

const HID = require('node-hid')
const devices = HID.devices()

console.log('DEVICES:', devices)

Getting this with a keyboard connected:

node: can't resolve symbol 'libiconv_open'

If I unplug the keyboard I get and empty array (which makes sense)

Any ideas?

from t2-start.

danawoodman avatar danawoodman commented on September 14, 2024

@HipsterBrown do you have time to push the v0.7.2 version? Maybe that is the issue?

from t2-start.

rwaldron avatar rwaldron commented on September 14, 2024

@danawoodman I've cross compiled v0.7.2 and uploaded it just now

from t2-start.

danawoodman avatar danawoodman commented on September 14, 2024

I updated to the newest version but I am still getting:

path.js:7
    throw new TypeError('Path must be a string. Received ' + inspect(path));
    ^

TypeError: Path must be a string. Received undefined
    at assertPath (path.js:7:11)
    at dirname (path.js:1324:5)
    at Function.exports.getRoot (/tmp/remote-script/node_modules/node-hid/node_modules/bindings/bindings.js:1:1834)
    at exports (/tmp/remote-script/node_modules/node-hid/node_modules/bindings/bindings.js:1:1000)
    at e (/tmp/remote-script/node_modules/node-hid/nodehid.js:1:101)
    at Object.exports.devices (/tmp/remote-script/node_modules/node-hid/nodehid.js:1:1171)
    at Function.devices (/tmp/remote-script/src/models/rfid-reader.js:1:198)
    at s.initializeRFIDReader (/tmp/remote-script/src/models/doorlock.js:1:358)
    at new s (/tmp/remote-script/src/models/doorlock.js:1:259)
    at Object.<anonymous> (/tmp/remote-script/src/boot.js:1:63)

With this code:

const hid = require('node-hid')
console.log(hid.devices())

Any suggestions?

from t2-start.

danawoodman avatar danawoodman commented on September 14, 2024

Has anyone ever been able to get node-hid working on a Tessel? This is becoming really frustrating because I bought the Tessel specifically to use a USB RFID reader (the module won't work as it is the wrong frequency). Someone please save my day! 😚

from t2-start.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.