So, I have this Leonardo-based serial sniffer that saves all serial data received on the RX pin to an SD card.
When my Yún arrived, I decided to migrate it and add some cool new internet features. But I'm stuck trying to reproduce what I already have on the Leonardo. Serial is only for USB communication, and Serial1 is used for Bridge, which I need to save my files.
Is there any way to get old-fashioned RX/TX Serial communication and the Bridge working at the same time?
If you try make sure you pay attention to this:
Not all pins on the Leonardo support change interrupts, so only the following can be used for RX: 8, 9, 10, 11, 14 (MISO), 15 (SCK), 16 (MOSI).
A USB to TTL?
I have my serial port connected to linino and use serial and bridge at the same time.
I guess if you have a USB to ttl converter you can simply use serial as you did before.
Best regards
Jantje
I've been working on a project where I'm doing something similar, communicating with a device over serial and then sending the results to another device over wifi.
The only solution I've found is to stop the serial communication with Serial1.end(), start up the bridge, transmit my info, then start serial back up again. It works, but I'm encountering stability problems after running for 12+ hours. They might be unrelated, though.
cornwd:
The only solution I've found is to stop the serial communication with Serial1.end(), start up the bridge, transmit my info, then start serial back up again. It works, but I'm encountering stability problems after running for 12+ hours. They might be unrelated, though.
What I did was lots simpler.
Just plug in a usb cable between linino and leonardo.
After installing some packages you can simply read the serial with a simple redirect on linino <</dev/ttyACM0 or with minicom
JosAH:
I´m showing my stupidity here, I´m sure, but if the two processsors can ommunicate over Serial1/-dev/ttyATH0, what´s the use for a second line?
kind regards,
Jos
No stupidity. I wanted to use /-dev/ttyATH0 first to. I actually never got an answer on my how to question How to extend the bridge? - Arduino Yún - Arduino Forum
So if you have some code that uses Serial and you have some code to parse the outcome of the Serial it may be easier to just continue using this code and have the connection between the 2 usb ports on the yun than to modify the code and bridge.