Skip to content

Not sure if bug or code problems #4

@vinci58123

Description

@vinci58123

Hi there tried putting in the sample code:
// Load the node-omron-hvc-p2 and get a HvcP2 constructor object
const HvcP2 = require ('node-omron-hvc-p2');
// Create a HvcP2 object
const hvcp2 = new HvcP2();

// Connect to the HVC-P2
hvcp2.connect().then(() => {
// Send a command for detecting
return hvcp2.detect({
face: 1, // Enable face detection
age: 1, // Enable age estimation
gender: 1 // Enable gender Estimation
});
}).then((res) => {
// Show the result
console.log(JSON.stringify(res, null, ' '));
// Disconnect the HVC-P2
return hvcp2.disconnect();
}).then(() => {
console.log('Disconnected.');
}).catch((error) => {
console.error(error);
});

to see if it works, but the error <0x800a1391 - JavaScript runtime error: 'require' is not defined> so not sure what im doing wrong here, using VS 2017 and have installed all the required items except lwip, unless lwip is required, thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions