All Projects → fiskeben → mcp3008.js

fiskeben / mcp3008.js

Licence: other
A node.js module for querying an mcp3008 analog/digital converter.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to mcp3008.js

WriteYourOwnReact
Write your own version of React. Why? Because you CAN!
Stars: ✭ 20 (-16.67%)
Mutual labels:  diy, diycode
python-tutorial-codes
Python 🐍 Tutorials
Stars: ✭ 23 (-4.17%)
Mutual labels:  diy, diycode
RJModules
Various modules for VCV Rack
Stars: ✭ 94 (+291.67%)
Mutual labels:  diy
xsampa
X-SAMPA to IPA converter
Stars: ✭ 20 (-16.67%)
Mutual labels:  converter
fontify
Converts SVG icons to OTF font and generates Flutter-compatible class. Provides an API and a CLI tool.
Stars: ✭ 88 (+266.67%)
Mutual labels:  converter
EncoderTool
The EncoderTool is a library to manage and read out rotary encoders connected either directly or via multiplexers to ARM based boards. Encoder push buttons are supported. Callback functions can be attached to encoder changes and button presses to allow for event driven applications
Stars: ✭ 29 (+20.83%)
Mutual labels:  polling
wikitable2csv
A web tool to convert Wiki tables to CSV 📈
Stars: ✭ 112 (+366.67%)
Mutual labels:  converter
php-to-zephir
Convert PHP 7 files to Zephir zep files and create a native PHP extension
Stars: ✭ 25 (+4.17%)
Mutual labels:  converter
wiki
从diy行为艺术到diy苏格拉底式对话,从diy一个仪式到diy一次旷课,各种活动指南的百科。diy💔是706孵化的一个非代码开源项目。
Stars: ✭ 49 (+104.17%)
Mutual labels:  diy
instagram json viewer
Transforms Instagram's *.json / backup data - that you get via the Data Download Tool - to a readable format!
Stars: ✭ 41 (+70.83%)
Mutual labels:  converter
symreader-converter
Converts between Windows PDB and Portable PDB formats.
Stars: ✭ 50 (+108.33%)
Mutual labels:  converter
Gm1KonverterCrossPlatform
A tool to convert strongholds gm1 and tgx files to png.
Stars: ✭ 20 (-16.67%)
Mutual labels:  converter
use-axios-hooks
axios hooks for common network calls scenarios
Stars: ✭ 27 (+12.5%)
Mutual labels:  polling
ATtiny13-TinyUPS
Uninterruptible Power Supply
Stars: ✭ 92 (+283.33%)
Mutual labels:  diy
spring-file-poller
A simple spring boot application that demonstrates file polling using the Spring Integration DSL
Stars: ✭ 25 (+4.17%)
Mutual labels:  polling
nvim-highlite
A colorscheme template that is "lite" on logic for the developer.
Stars: ✭ 163 (+579.17%)
Mutual labels:  diy
Arduino-MDB-UART
Atmega1284 PLC as MDB-UART converter/MDB Master/MDB VMC emulator
Stars: ✭ 70 (+191.67%)
Mutual labels:  diy
chpc
CHPC: Cheap Heat Pump Controller
Stars: ✭ 27 (+12.5%)
Mutual labels:  diy
json2codable
A command line tool to generate a Swift Codable struct from a JSON document
Stars: ✭ 19 (-20.83%)
Mutual labels:  converter
godmt
Tool that can parse Go files into an abstract syntax tree and translate it to several programming languages.
Stars: ✭ 42 (+75%)
Mutual labels:  converter

mcp3008.js

A node.js module for interfacing the MCP3008 analog/digital converter.

The same instance of the module can control all eight channels on the converter.

Installation

$ npm install mcp3008.js

Usage

Here's a short example:

var Mcp3008 = require('mcp3008.js'),
    adc = new Mcp3008(),
    channel = 0;

adc.read(channel, function (value) {
    doSomethingToValue(value);
});

Interface

Constructor

new Mcp3008([device]);

Device defaults to /dev/spidev0.0.

Reading

instance.read(channel, callback);

This will read the value on channel and send it to callback.

Polling

instance.poll(channel, interval, callback);

This will read the value on channel every interval milliseconds and send it to callback. Use instance.stop(channel) to stop it.

Tear down

instance.close();

This will release the device and stop polling (if any).

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].