7 ms·
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 cha
by NinoScript 9y ago
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.
- Animats 9y agoAgreed. 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.
- fest 9y agoIt's even more annoying when Windows does succeed interpreting data coming from device and cursor starts moving around and clicking randomly.
- jacquesm 9y agoBetter 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.