node-dht-sensor icon indicating copy to clipboard operation
node-dht-sensor copied to clipboard

Different mapping options

Open kothique opened this issue 6 years ago • 2 comments

sensor.initialize({
  // ... options along the way,
  mapping: 'physical' // 'gpio', 'bcm', 'wiringPi' could be supported for example (bcm === gpio)
});

The default option would be 'gpio' for compatibility. Also I don't know if it should be done on JS or C++ side.

kothique avatar May 10 '19 03:05 kothique

I like the idea. I'd prefer to have the mapping done in the JS layer. I'd like to avoid growing the C/C++ layer unless there's a good reason for it (e.g. performance, low-level GPIO access, etc).

momenso avatar May 11 '19 02:05 momenso

Agreed.

kothique avatar May 11 '19 05:05 kothique