123456789101112 |
- void setup() {
- // $ stty -F /dev/ttyUSB0 | grep speed
- Serial.begin(115200);
- // A0 for compatibility with analog configuration
- pinMode(A0, INPUT);
- }
- void loop() {
- // effective sample rate measured with "Probe Rate" block
- // $ tail --follow /dev/ttyUSB0 | od --format=u1 --width=1
- Serial.write(digitalRead(A0));
- }
|