node-pantilt-hat

Pimoroni PanTilt servo and lighting HAT for node.js

Usage no npm install needed!

<script type="module">
  import nodePantiltHat from 'https://cdn.skypack.dev/node-pantilt-hat';
</script>

README

node-pantilt-hat

Build Status

Pan-Tilt HAT for Node.js

Install

npm install node-pantilt-hat

Usage

import { NodePanTilt } from 'node-pantilt-hat';

const pantilt = new NodePanTilt();

pantilt.setPan(10); // -90 to 90
pantilt.setTilt(20); // -90 to 90

pantilt.getPan(); // 10
pantilt.getTilt(); // 20