EnotionZ/gpio

_write fails when writing number to file

Opened this issue · 0 comments

nojasm commented

The _write() function fails when the user is exporting a GPIO port:

TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received type number (15)

Adding .toString() to the fs.writeFile() 'str' option seams to do the job just fine.