
MCP3008.JS
Un module Node.js pour interroger un convertisseur analogique / numérique MCP3008.
0
Github Watches
6
Github Forks
23
Github Stars
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).
相关推荐
I find academic articles and books for research and literature reviews.
Emulating Dr. Jordan B. Peterson's style in providing life advice and insights.
Confidential guide on numerology and astrology, based of GG33 Public information
Your go-to expert in the Rust ecosystem, specializing in precise code interpretation, up-to-date crate version checking, and in-depth source code analysis. I offer accurate, context-aware insights for all your Rust programming questions.
Advanced software engineer GPT that excels through nailing the basics.
Take an adjectivised noun, and create images making it progressively more adjective!
Découvrez la collection la plus complète et la plus à jour de serveurs MCP sur le marché. Ce référentiel sert de centre centralisé, offrant un vaste catalogue de serveurs MCP open-source et propriétaires, avec des fonctionnalités, des liens de documentation et des contributeurs.
Manipulation basée sur Micropython I2C de l'exposition GPIO de la série MCP, dérivée d'Adafruit_MCP230XX
L'application tout-en-un desktop et Docker AI avec chiffon intégré, agents AI, constructeur d'agent sans code, compatibilité MCP, etc.
Un puissant plugin Neovim pour gérer les serveurs MCP (Protocole de contexte modèle)
MCP Server pour récupérer le contenu de la page Web à l'aide du navigateur sans tête du dramwright.
Pont entre les serveurs Olllama et MCP, permettant aux LLM locaux d'utiliser des outils de protocole de contexte de modèle
Plateforme d'automatisation de workflow à code équitable avec des capacités d'IA natives. Combinez le bâtiment visuel avec du code personnalisé, de l'auto-hôte ou du cloud, 400+ intégrations.
🧑🚀 全世界最好的 LLM 资料总结 (数据处理、模型训练、模型部署、 O1 模型、 MCP 、小语言模型、视觉语言模型) | Résumé des meilleures ressources LLM du monde.
La communauté du curseur et de la planche à voile, recherchez des règles et des MCP
Une liste organisée des serveurs de protocole de contexte de modèle (MCP)
Reviews

user_aYRIlacv
As a dedicated user of mcp3008.js, I can confidently say that this library by fiskeben is an excellent tool for working with the MCP3008 ADC in Node.js. It simplifies the process and offers great documentation on GitHub. If you're looking for a reliable and straightforward way to interface with the MCP3008, this is the best solution available. Highly recommended!