--
You received this message because you are subscribed to the Google Groups "zetta-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zetta-discuss+unsubscribe@googlegroups.com.
To post to this group, send email to zetta-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/zetta-discuss/91a876d2-2b2e-4577-ae06-1a6bb4bb1df0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Would you be able to .use() just the LED driver? That would accomplish what you're looking to do.
--Matthew Dobson | apigee | m: +1.734.634.5472 | twitter @mdobs @apigee | Apigee Community for answers, ideas and support!
On Fri, Feb 10, 2017 at 12:40 PM, Scott Erholm <sc...@agilatech.com> wrote:
Maybe I'm missing something, or maybe I'm trying to stretch zetta beyond its capabilities...I'd like to hook up several devices of the same type to the hub, and all would therefore use the same driver. However, since each hardware device would have its own electrical pins and such parameters, the drivers need to be initialized with their own options. This is where I'm running into problems.Let's say I have three LEDs hooked up. It would be nice to do something like this:const zetta = require('zetta');const led = require('zetta-led-scout');zetta().use(led, {"name":"LED1", "pin":"32"}).use(led, {"name":"LED2", "pin":"57"}).use(led, {"name":"LED3", "pin":"14"}).listen(1137);Once the scout's init function is called, the options have been overwritten on the first two instantiations, so every LED is named 'LED3' and uses pin 14.What is the best way to instantiate multiple devices of the same kind with different parameters in zetta?Thanks,Scott
--
You received this message because you are subscribed to the Google Groups "zetta-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zetta-discus...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to zetta-discuss+unsubscribe@googlegroups.com.
To post to this group, send email to zetta-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/zetta-discuss/1abdf772-ad5e-4f9e-bfcf-5a1f64969696%40googlegroups.com.