This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/MSP430FR2355: How to send data to Launchpad with GUI Composer.

Expert 2780 points

Part Number: MSP430FR2355
Other Parts Discussed in Thread: MSP-EXP430FR2355,

Tool/software: Code Composer Studio

Hello,

I am trying to create an application using GUI Composer and Launchpad.

I was able to display the character string sent from Launchpad in the GUI Application,
but I do not know how to send the string to Launchpad from that GUI Application.
I am using GUI Composer cloud + MSP-EXP430FR2355.
The current setting is streaming.
I want to assign it to the on click of the button.


Excerpt of setting part (symbol label is default)

<ti-transport-usb id="my_transport" hidden usb device-name="MSP430FR2355" default-baud-rate="115200" class="_TI_">
<ti-model-streaming id="my_model" hidden protocol="json" class="_TI_"></ti-model-streaming>
</ti-transport-usb>

Button's on click function

var sendData = function() {
   //ti_widget_label.label = ti_widget_numberbox.value;
   <---------------------------------------------------------------------------------------- add Code?

}

Regards,
Da
  • Hi Da,
    There are two ways to send data to the launchpad. This is assuming that you are sending JSON object with the property named myVar. i.e {myVar: 'some text'}

    1. Get the binding for the data defined in your json object and set its value. This is how you do it, gc.databind.registry.getBinding('myVar').setValue(new text'). You can add this to the sendData function.

    2. Bind the widget directly to myVar. Select the widget in the designer and open the Properties view. Click on the link icon for the value (assuming you are using text box or number box) property. Make sure you have my_model selected in the drop list and enter myVar.

    Regards,
    Patrick