Announcement

Collapse
No announcement yet.

Trouble with Serial Mode con,nection between SOMO II and Arduino

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Doff
    replied
    Hi Zuko,

    At first glance I see nothing wrong with your sketch. Were you able to see the actual hex bytes using a serial terminal application in your PC? You can also use a logic analyzer if you have one. I am attaching a short demo sketch created by one of my colleagues. The sketch is for the the Mega2560 - it uses port Serial for the serial monitor and port Serial2 for the SOMO-II. I trust that you will be able to modify it accordingly for the Leonardo.

    Hope this helps and regards.
    Attached Files

    Leave a comment:


  • Zuko
    started a topic Trouble with Serial Mode con,nection between SOMO II and Arduino

    Trouble with Serial Mode con,nection between SOMO II and Arduino

    Hi, I'm trying to select the play source of my module SOMO II with an Arduino Leonardo, but I think I'm not doing the serial communitacion correctly. The idea is that depending of the combination of the inputs, a certain track is selected.

    This is my code:

    Code:
    void setup() {
    Serial1.begin(9600) 
    }
    
    void loop() {
    
    if(...) //A confirmation button is pressed
    {
    
    
    if (....) //Input combination
    {
    byte Track[8] = {0x7E, 0x0F, 0x00, 0x01, 0x01, 0xFF, 0xFC, 0xEF};  //Track1
    Serial1.write(Track,8);
    }
    
    if (....) {
    byte Track[8] = {0x7E, 0x0F, 0x00, 0x01, 0x02, 0xFF, 0xFC, 0xEF}; //Track2
    Serial1.write(Track,8);
    }
    
    }
    }
    Is this right? Should I use Serial.print(val,HEX) instead?

    Also the Documentation says that there isn't any Parity bit or Flow Control. Does the standard serial TTL commutication of Arduino satisfies this?
Working...
X