monteslu / node-red-contrib-gpio

A set of node-red nodes for connecting to johnny-five IO Plugins
MIT License
41 stars 31 forks source link

Sampling Interval for Analogue Pins #27

Open BakedInd opened 7 years ago

BakedInd commented 7 years ago

Is this feature broken?

I have tried changing the sampling intervals to a bunch of different settings and nothing seems to change the sample rate coming from the node.

Is it broken? Is it supposed to be milliseconds?

monteslu commented 7 years ago

@BakedInd I'm setting the value, but it could be that the IO implementation is ignoring it. https://github.com/monteslu/node-red-contrib-gpio/blob/master/gpio.js#L68

Which board are you using it on?

BakedInd commented 7 years ago

Thanks for the fast response! It's on just a Raspberry Pi 3

BakedInd commented 7 years ago

Sorry... to clarify more...

Node Red on RPi 3, with Arduino Mega 2560 connected via USB running all our sensors (standard firmata, of course)

BakedInd commented 7 years ago

Node Red is being run on Raspbian Lite OS

monteslu commented 7 years ago

running this against an UNO. Seems to be working ok with the StandardFirmata sketch. using a simple analog out to a debug:

[{"id":"1a38a718.700729","type":"gpio in","z":"d7617793.6052e8","name":"","state":"ANALOG","samplingInterval":"1000","pin":"0","board":"ef3fef2d.6949d","x":316.5,"y":688,"wires":[["bdab348a.4669e8"]]},{"id":"bdab348a.4669e8","type":"debug","z":"d7617793.6052e8","name":"","active":true,"console":"false","complete":"false","x":528.5,"y":702,"wires":[]},{"id":"ef3fef2d.6949d","type":"nodebot","z":"","name":"","username":"","password":"","boardType":"firmata","serialportName":"/dev/cu.wchusbserial1410","connectionType":"local","mqttServer":"","socketServer":"","pubTopic":"","subTopic":"","tcpHost":"","tcpPort":"","sparkId":"","sparkToken":"","beanId":"","impId":"","meshbluServer":"https://meshblu.octoblu.com","uuid":"","token":"","sendUuid":""}]