tessel / climate-si7005 Goto Github PK
View Code? Open in Web Editor NEW[UNMAINTAINED] JS library for the si7005 temperature and humidity sensor.
License: Other
[UNMAINTAINED] JS library for the si7005 temperature and humidity sensor.
License: Other
Add code of conduct badge, a la tessel/project#190
The event example in this repo is nice, but didn't work with the current npm version 0.1.3 (or at least not based on my quick test).
Ended up installing the module like this for now to get the latest:
npm install tessel/climate-si7005
_lastTemperature
in line 186 of index.js evaluates to a null value and throws errors sometimes.
@pmcote is assigned. Find out from Jia if that's the case and if it's possible to do this.
@pmcote is assigned.
Currently this module produces a warning each time a measurement is taken.
Probably due to the following line
index.js:161:self.hardware.digital[self.csn].write(1, function(err, data){
When attempting to use the climate-si7005 module on a tessel 2 with the basic climate.js sample app, the following error occurs:
host_box:my_puck jonathan$ t2 run --full climate.js
INFO Looking for your Tessel...
INFO Connected to mypuck-1 over LAN
INFO Writing project to RAM on mypuck-1 (133.632 kB)...
INFO Deployed.
INFO Running climate.js...
Connected to climate module
/tmp/remote-script/node_modules/climate-si7005/index.js:162
self.hardware.digitalWrite(self.csn, 1);
^
TypeError: self.hardware.digitalWrite is not a function
at /tmp/remote-script/node_modules/climate-si7005/index.js:162:31
at null.<anonymous> (/tmp/remote-script/node_modules/climate-si7005/index.js:114:7)
at null.<anonymous> (/usr/lib/node/tessel-export.js:207:31)
at emitNone (events.js:67:13)
at Socket.emit (events.js:166:7)
at emitReadable_ (_stream_readable.js:411:10)
at emitReadable (_stream_readable.js:405:7)
at readableAddChunk (_stream_readable.js:157:11)
at Socket.Readable.push (_stream_readable.js:110:10)
at Pipe.onread (net.js:523:20)
Script that causes the problem is this example straight from the tessel 2 start guide (with the module name changed to climate-si7005
instead of climate-si7020
:
var tessel = require('tessel');
var climatelib = require('climate-si7005');
var climate = climatelib.use(tessel.port['A']);
climate.on('ready', function () {
console.log('Connected to climate module');
// Loop forever
setImmediate(function loop () {
climate.readTemperature('f', function (err, temp) {
climate.readHumidity(function (err, humid) {
console.log('Degrees:', temp.toFixed(4) + 'F', 'Humidity:', humid.toFixed(4) + '%RH');
setTimeout(loop, 300);
});
});
});
});
climate.on('error', function(err) {
console.log('error connecting module', err);
});
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.