Re:Nubsio GPIO API – A Windows USB interface for controlling...
by NinoScript on Sunday April 02, 2017 @11:50PM
(#14020486)
Please change the default direction to input (high-z). You could potentially fry some sensor or make a short circuit if they start in output before the code changes them to input.
[ Parent
| on HN ]
Re:Nubsio GPIO API – A Windows USB interface for controlling...
by Animats on Monday April 03, 2017 @02:00AM
(#14020875)
Agreed. Power up sequencing on dumb low-level interfaces has to be thought through carefully. You may turn on something you don't want to turn on.
I have a device which controls an antique Teletype machine from a USB port. It uses the request to send signal on a USB-simulated serial port to start the Teletype motor. This works fine on Linux. On Windows, the motor starts and stops several times when the USB device is plugged in or Windows starts up. That's because an old Windows feature is probing the serial port for a serial mouse. Annoying.
Re:Nubsio GPIO API – A Windows USB interface for controlling...
by fest on Monday April 03, 2017 @07:04AM
(#14021888)
It's even more annoying when Windows does succeed interpreting data coming from device and cursor starts moving around and clicking randomly.
Re:Nubsio GPIO API – A Windows USB interface for controlling...
by jacquesm on Monday April 03, 2017 @08:17AM
(#14022190)
Better yet: provide a 'output state valid' bit that is held low as long as some magic hasn't happened. Even an output configured as an input could cause that output to drift into 'undefined' territory.
An output state valid bit can be used to suppress all activation of external actuators until the software has been initialized and the state of the outputs can be safely exposed.