I have implemented a signal generator in a Teensy 4.0 sketch. It uses the USB Serial device: detecting a new connection, writing "SignalGenerator 1.0", and then reading the Serial device for commands and writing responses.
It works fine on my Mac laptop (Teensyduino IDE not running):
Note that putting the "cat" in the background keeps the serial device open and lets me see responses to commands.
On a Raspberry Pi 3B+ running Raspbian, after using lsusb to find it:
That looks like the wrong baud rate. How do I fix this?
It works fine on my Mac laptop (Teensyduino IDE not running):
Code:
(plug in USB)
$ cat /dev/cu.usbmodem71506301 &
SignalGenerator 1.0
(accepts commands via "echo >/dev/cu.usbmodem71506301 command")
On a Raspberry Pi 3B+ running Raspbian, after using lsusb to find it:
Code:
(plug in USB)
$ cat /dev/bus/usb/001/007 &
@??y C?2 $$$$?
That looks like the wrong baud rate. How do I fix this?