Comments (2)
device.transfer(message, cb)
works fine for me. The stress test tmp.js calls device.transfer(message, cb)
successfully over 500 times a second to determine the temperature using a TMP36 analog temperature sensor wired to an MCP3008 SPI A/D converter on a Raspberry Pi 2.
Here is an example of the output from tmp36.js:
pi@raspberrypi:~/test/node_modules/spi-device/test/stress $ time node tmp36
606 606 223 21.935483870967744
556 1162 223 21.935483870967744
581 1743 223 21.935483870967744
585 2328 223 21.935483870967744
585 2913 223 21.935483870967744
582 3495 223 21.935483870967744
583 4078 223 21.935483870967744
592 4670 223 21.935483870967744
592 5262 223 21.935483870967744
590 5852 223 21.935483870967744
585 6437 223 21.935483870967744
595 7032 223 21.935483870967744
599 7631 223 21.935483870967744
584 8215 223 21.935483870967744
587 8802 223 21.935483870967744
588 9390 223 21.935483870967744
588 9978 223 21.935483870967744
586 10564 223 21.935483870967744
^C
real 0m19.077s
user 0m2.968s
sys 0m2.102s
I would suggest carefully studying the datasheet of the SPI device that you wish to use to confirm that it is being used correctly.
from spi-device.
Thank you very much for your quick response!
When cs1 is manually controlled, the second poll passes without errors.
I'm still researching the problem. I'm using a custom cs1 overlay.
My board nanoPi Neo.
Thanks for your hard work.
from spi-device.
Related Issues (20)
- Can you please help me with this issue not able to install spi-device module HOT 6
- Drop support for Node.js v0.10, v0.12, v5 and v7 HOT 1
- Add platform-conditional directive around spidev include HOT 2
- can't find SPI device channel arguments! HOT 4
- Help with spi-device and THAT5171 chip HOT 8
- Module did not self-register HOT 2
- SPI - question to control a push button with bitmap in SPI HOT 26
- Issue with Max31865 HOT 7
- can't change chipSelectHigh HOT 13
- Configure options not working HOT 16
- Fix tests HOT 1
- Uncaught Error: EINVAL, incorrect arguments passed to transferSync(message) HOT 3
- Crashed on open if options parameter is null or undefined
- node-gyp fails on armv7 32bit HOT 15
- USB to spi device
- Bump nan HOT 2
- Help Switch from Arduino sketch to Node HOT 1
- correct values for speedHz and maxSpeedHz settings on Raspberry Pi? HOT 2
- Fails to install on Rasperry Pi 2 B HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spi-device.