Closed romner-set closed 3 months ago
Arduino uses DTR,RTS for resetting the device. You have to the those lanes accordingly so the Arduino isn't held in RESET
You can use https://github.com/ZigEmbeddedGroup/serial/blob/9765882e390f1dcda41ad2a81283e5dbad122d4b/src/serial.zig#L811 to do that :)
That works, thanks! Here's the code incase anyone comes across this in the future:
try zig_serial.changeControlPins(serial, zig_serial.ControlPins{ .rts = true, .dtr = true });
I'm on Linux (NixOS specifically) trying to use this library to communicate with an Arduino Nano 33 BLE.
Everything works fine if the port was pre-configured by running
screen /dev/ttyACM0
andzig_serial.configureSerialPort()
is never called, but calling it messes up the port somehow and makes it so no input is ever received. This is my program:I'm using zig v0.13.0. To install the lib I used the following command:
Then added this to
build.zig
: