An open API service indexing awesome lists of open source software.

https://github.com/phts/np-01_buttons


https://github.com/phts/np-01_buttons

phts-electronics phts-np-01

Last synced: about 1 month ago
JSON representation

Awesome Lists containing this project

README

          

# PHTS NP-01: buttons

Event handlers of buttons on a front panel of [PHTS NP-01].

:warning: Some of those commands also used by [IR controller].

## Current mappings

![](https://image.easyeda.com/pullimage/P1ExBecBeSxIv2muLd6SAAzfSfF7M1A6Ks2ER6qd.png)


Name
Short press
Long press


While playing
While paused



SHUTDOWN
Gracefully shutdown the device
Reboot the device



Toggle screen modes: "Track info", "VU meter", "Screensaver"


Current screen mode
Track infoVU meterScreensaver
Toggle repeat/random track modeToggle background image




▶ / ⏸
Play or pause
Stop after current track
Play selected playlist



Jump to the beginning of the current track or to the previous track
Rewind 10 seconds
Select previous playlist



Jump to next track
Fast forward 10 seconds
Select next playlist

## Install

```sh
cd /home/volumio
git clone https://github.com/phts/NP-01_buttons.git
cd NP-01_buttons
npm i --only=prod
```

## Usage

`/etc/rc.local`:

```sh
...

sudo bash /home/volumio/NP-01_buttons/run.sh &

...
```

## Debug and development

1. Find process `node app/index.js` and kill it

```sh
ps -elf | grep app/index.js
sudo kill
```

2. Run this app locally

```sh
cd ~/NP-01_buttons
sudo node app/index.js
```

[PHTS NP-01]: https://tsaryk.com/NP-01
[IR controller]: https://github.com/phts/NP-01_IR-controller-configs