How to use oled node

Hi @kenkoknz

there are a number of ways you can create such an payload. Here are just some using the core nodes available in the palette. Each uses a slightly different syntax. All of these examples assume the text you want to display is in msg.payload and you want to create the JS Object as you describe to wrap it.

  1. A Template node can be used to provide some template text with parts replaced by values provided by the received message. For example, the following template would insert the value of msg.payload into the template (and by default, the Template node sets msg.payload with the result). You would also need to configure the node to 'output as Parsed JSON'

    { "size":3, "x":1,"y":1,"text":"{{payload}}"}
    
  2. A Change node can be do it by configuring it to set msg.payload to the JSONata expression:

    { "size":3, "x":1,"y":1,"text":payload}
    

  3. A Function node is the all-purpose node where you can write whatever javascript you want:

    msg.payload = { "size":3, "x":1,"y":1,"text":msg.payload};
    return msg;