Johnny-five: io.pinMode is not set when pwmRange is passed in servo.opts

Created on 25 Nov 2017  路  2Comments  路  Source: rwaldron/johnny-five

All 2 comments

@dtex do you mean in this code when either servoConfig or pinMode is called? If so, according to the io-plugins specification servoConfig(options) may be called as an alternative to calling pinMode. In reality, I don't think servoConfig(options) is ever actually called but servoConfig(pin, min, max) is and by the looks of things as an alternative to calling pinMode. At least that's what I noticed when implementing servoConfig(pin, min, max) in linux-io. There were scenarios where servoConfig(pin, min, max) was being called for pins that were not in SERVO mode so it was necessary to call pinMode inside servoConfig(pin, min, max).

@fivdi that鈥檚 exactly it. Thanks for explaining. The problem is with my servoConfig implementation in another io plugin. Thanks!

Was this page helpful?
0 / 5 - 0 ratings