Welcome new user! You can search existing questions and answers without registering, but please register to post new questions and receive answers. Note that due to large amounts of spam attempts, your first three posts will be manually moderated, so please be patient.
Because of un-manageable amounts of spam despite our use of CAPTCHAs, email authorization, and other tools, we have discontinued this forum (see the 700k+ registered users with validated email addresses at right?). Please email us any questions or post bug reports and feature requests on GitHub at https://github.com/jevois -- The content below remains available for future reference.

Is it possible to send Jevois serial monitor message to Arduino?

+3 votes
Hello, I have succeeded in passing serial commands from Jevois to Arduino and vice versa, however, there is one more thing I'd wish to do. I'd like to display the serial monitor output from Jevois's "help" and "listmappings" command to Arduino's serial monitor as well. Is there a way to do this? Would Serial1.readBytesUntil solve the problem in any way?
asked Jul 16, 2018 in Programmer Questions by JeVoisNewbie (430 points)

1 Answer

+1 vote
Best answer

It is very simple. Just use a modified version of the Arduino example "SerialPassThrough".

The modification is changing the "Serial.write..." to "Serial.print..."

Something like this:

void loop() {
    if (Serial1.available()) {     // If anything comes in Serial1 (pins 0 & 1)
    Serial.print(Serial1.read());   // read it and send it out Serial (USB)

answered Jul 16, 2018 by Billbo911 (1,110 points)
selected Jul 17, 2018 by JeVoisNewbie
Thank you for answering my question! The code you shared with me resulted in integer outputs. By adding an additional "(char)" converter to your code, it works like a charm!



Also, I think I set my "Serial1.setTimeout()" parameter to be too small, so that might have been an issue as well.
Thank you so much for your help!