Skip to content

Dracaltech/sample-node-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sample-node-cli

Dracal // SDK code sample for Node on CLI

Assumptions

Running this repository requires you to have installed:

  • Node (version >= 18)
  • DracalView (version >= 3.2.x)
    • Specifically, dracal-usb-get needs to be accessible from your PATH environment variable (more info in the documentation how-to).

Script may need to be adjusted depending on your instrument's # of outputs (currently assumed: 3 outputs). See script comments for details.

Ideally, you've also installed yarn package manager:

npm install -g yarn

Simple usage

Install dependencies

yarn  //you can also use `npm install` if you prefer

Run script

yarn start  //or `npm run start`

Sample output

↑1 dracal/sample-node-cli git:(main) ▶ yarn start
yarn run v1.22.21
$ node -r @babel/register app.js
Pressure..(kPa): 101.19
Temperature.(C): 21.56
RH..........(%): 56.63
Temperature.(F): 70.80799999999999
Done in 0.30s.
Ξ dracal/sample-node-cli git:(main) ▶  

About

Dracal // SDK code sample for Node on CLI

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published