4 ms·
Switching the pin mode should be exactly what Rust is offering over potentially more advanced C++ solutions, because you can take a "raw" pin as an input pin an
by morelisp 3y ago
Switching the pin mode should be exactly what Rust is offering over potentially more advanced C++ solutions, because you can take a "raw" pin as an input pin and ensure you don't use it as an output pin for exactly the duration you have it as an input pin.
- pjmlp 3y agoSame thing in C++, when one actually uses the C++ type system. Rust can be made as unsafe as the C example, by calling digitalWrite() directly, instead of using the language type system.