npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

node-raspi-pico-ups

v1.0.3

Published

Node helper to access pico ups states and variables

Downloads

3

Readme

node-raspi-pico-ups

Node helper to access pico ups info for pimodules' HV3.0a 450 model

NPM Downloads License NPM Version

Installation

NPM

npm install --save node-raspi-pico-ups

Usage

getPowerModeLabel

Retrurn the label of the power mode (usb or battery)

var pico = require('node-raspi-pico-ups');

console.log('Current power mode :', pico.getPowerModeLabel(val));
//Current power mode : usb

getCurrentPowerMode

Returns the current battery mode (1 for usb, 2 for battery)

var pico = require('node-raspi-pico-ups');

console.log('Current power mode :', pico.getCurrentPowerMode());
//Current power mode : 1

getCurrentBatteryVoltage

Returns the battery voltage

var pico = require('node-raspi-pico-ups');

console.log('Current Battery voltage :', pico.getCurrentBatteryVoltage(), 'V');
//Current Battery voltage : 4.21 V

getCurrentRpiVoltage

Returns the raspberry's current power supply voltage

var pico = require('node-raspi-pico-ups');

console.log('Current Power voltage :', pico.getCurrentRpiVoltage(), 'V');
//Current Power voltage : 4.882 V

getTemperature

Returns the temperature mesured by the embedded NTC1 sensor

var pico = require('node-raspi-pico-ups');

console.log('Temperature :', pico.getTemperature(), '°C');
//Temperature : 50 °C

printInfo

Prints collected info to the console

var pico = require('node-raspi-pico-ups');

pico.printInfo();

renders :

Current power mode : usb
Current Battery voltage : 4.21 V
Current Power voltage : 4.882 V
Temperature : 50 °C