Search found 1 match

by DoubleHP
Saturday 21 October 2017 16:00
Forum: Others
Topic: Relay via USB serial port CP2102
Replies: 7
Views: 2858

Re: Relay via USB serial port CP2102

I have published a detailed answer here: https://forums.gentoo.org/viewtopic-p-8132756.html#8132756

Here is the short version:

#!/bin/bash
MySerialPort="/dev/ttyUSB0"
MyLatency="2"
echo "#include <fcntl.h>
#include <sys/ioctl.h>
main()
{ int fd; fd = open(\"${MySerialPort}\",O_RDWR | O_NOCTTY ...