serial bus not communicating

Posted on
  • HI,

    I'm trying to do something really simple but it's not working (probably me again)...

    I would like the Pico to communicate with an MDFly TF Card MP3 Player Module via Serial1 but it doesn't seem to be doing it. The player is powered and in it's ready state, and the sdcard is loaded with 01-10.mp3 as required.

    When the trigger pin on Pico is pulled low, the setWatch fires as evidenced by the "TEST" print in console window, but no response is received from the player.

    Attached are some data sheet pages for the player.

    Can you guys see anything obvious?

    /* trigger pin ~ active low*/
    var START_PIN = B1;
    START_PIN.mode('input_pullup');
    
    USB.setConsole();
    Serial1.setup(9600, {rx:B7,tx:B6,bytesize:8,stopbits:1,parit­y:null});
    Serial1.on('data', function (data) {console.log(data);}); 
    
    function onInit(){
      setWatch(function(e){
        Serial1.println("0x01");
        print("TEST");
      }, START_PIN, {repeat:1, debounce : 100, edge:'falling'});
    }
    
    

    3 Attachments

    • FireShot Capture 113 -  - http___www.technobotsonline.com_Datasheets2_2900-702.pdf.png
    • FireShot Capture 116 -  - http___www.technobotsonline.com_Datasheets2_2900-702.pdf.png
    • IMG_20161202_133803.jpg
  • Looks like you've connected RX to RX and TX to TX?

    With Serial, you need to connect RX to TX and vice versa - it's a common issue :)

  • silly me! Still nothing though :(

  • You may need to print just the character code 1, not the string 0x01.

    Try: Serial1.print("\x01"); instead of Serial1.println("0x01");

  • That was it dude, many thanks! Onward....

  • asked a dumb question so deleted :)

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

serial bus not communicating

Posted by Avatar for pwhitrow @pwhitrow

Actions