johnnyman727 / rgb-tcs34725 Goto Github PK
View Code? Open in Web Editor NEWA Tessel-specific JavaScript driver for the TCS34725 RGB sensor
A Tessel-specific JavaScript driver for the TCS34725 RGB sensor
This may be a T2 bug, but I think not. Running any of the examples in the folder, I get
➜ rgb-tcs34725 git:(master) ✗ t2 run examples/lux.js
INFO Connecting to Tessel...
INFO Connected to Kelsey over LAN
INFO Writing examples/lux.js to RAM on Kelsey (175.616 kB)...
INFO Deployed.
INFO Running examples/lux.js...
:0
RangeError: Maximum call stack size exceeded
If I put a console.log in the first line of the call back from self.getRawData in the index file, it gives me some successful calls and then errors:
➜ rgb-tcs34725 git:(master) ✗ t2 run examples/lux.js
INFO Connecting to Tessel...
INFO Connected to Kelsey over LAN
INFO Writing examples/lux.js to RAM on Kelsey (175.616 kB)...
INFO Deployed.
INFO Running examples/lux.js...
getRawData
LUX: 19409.320960000005
getRawData
LUX: 19138.839040000006
getRawData
LUX: 19542.901760000008
getRawData
LUX: 19138.839040000006
getRawData
LUX: 19138.839040000006
getRawData
LUX: 19221.952000000005
getRawData
LUX: 19138.839040000006
getRawData
LUX: 19138.839040000006
getRawData
LUX: 19138.839040000006
:0
RangeError: Maximum call stack size exceeded
Seems like the module code depends on something running more slowly, perhaps?
As I was looking for a JS implementation of those many Python scripts I came across this code.
Unfortuanetely I cannot figure out what the first line of code requires -- "tessel".
The tessel.io website also did not give me such a module.
The description in the readme doesn"t say it is hardware-specific. But my RPi Zero with Johnny-Five and Raspi-io doesn't wirk with this code.
To adapt this code I's like to find a pointer to "require tessel" so I can figure out an adaptation.
Please point me to the required module.
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.