Results 1 to 3 of 3

Thread: Sniffing Serial Port Causing Odd Results

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Nov 2018
    Post Thanks / Like

    Default Sniffing Serial Port Causing Odd Results

    I'm able to echo the data from a 4-channel setup from vixen to a nano board. According to what I understand, vixen reads channel one, then channel two...until channel 4 is read. It will read zero or one depending on if a light is OFF or ON. Sequence.JPG. The image shows that channel one should be ON five times on that first green rectangle and the rest of the channels must be OFF. After sniffing the serial port, the data shows that the first channel is off, but the second channel is on instead. Sequence2.JPG. Can anyone tell me why the code jumps to the next byte? It behaves "most of the time" like this and sometimes it does it works as it suppose to work. Do I need to flush the serial port? Im using Arduino Uno to read off vixen. Could be that arduino UNO is not fast enough to update the serial port?. To clarify this post, please pay attention to the first green rectangle only. Thanks
          case DISP://Decodes Data and Translates
            state = IDLE;
            for (ch = 0; ch < MAX_CHANNELS; ch++)
              if (chVal[ch] > 0)
                echoSerial.write((char)256- chVal[ch]);

    Last edited by hbtousa; 02-23-2021 at 09:43 AM.

Tags for this Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts