Node-red Beginner

hello, i need to create an rgb color picker using node-red. I know some stuff with the software, however im having trouble for this assignment. Not sure where i would start with the RGB color picker using a string?
start by building the RGB LED circuit. Build the sketch so it will read and parse a string using the serial port. Parse the data so it reads the red, green, and blue values and updates the colour of the RGB LED on your breadboard.

Create a Node-RED flow that uses a colour picker. When the colour is updated on the dashboard, pass the value to a Serial Out node. Ensure that you are creating a JSON string that contains the red, green, and blue values.

Hi Ibram, welcome to the forum.

Is this a school assignment?

Have you got the RGD LED working on your breadboard using the serial port?

Have you got a colour picker on your Node-Red dashboard? When you select a colour, what msg.payload does the colour picker send?
What format should the payload be to control the LED?

Hello Jbudd.

Im a UX designer in college, but one of my courses is coding. This is a lab assignment, i have it setup with the breadboard and the code. But not sure how i would set it up using node-red. Would i use the color-picker dashboard first, then the json file, and a debug to complete the message?

Heres my skematic of the RGB.

heres my node-red file of what i have at the moment, still playing with it but just wanted to know if this is the right way to work the rgb color picker?

OK, so you can control the LED by sending a message to the Arduino over the serial port.

In Node-Red dashboard you have to select a colour, convert it to a format that the Arduino understands (JSON, i guess) and send it to the serial port.
You possibly need a colour picker node, some other node or nodes to put the data in the right format and a serial output node.
Debug nodes help by showing you how the message changes at each step.

So from my second screenshot with node-red, would I click on the color picker and change some stuff within the color picker ? so from the topic, would i put the msg from the code and replace it with "topic"?



I don't know, sorry! There is some help for the node available in the right hand column, on the "Help" tab.

Use debug nodes to show you the data coming from the colour picker and your other nodes.

No worries! thanks for the help though i appreciate it

You do know that if the Node-Red editor is at IPAddress:1880 , the dashboard where your colour picker shows up is at IPAddress:1880/ui ?

Those are the defaults, It may be set up slightly differently in a college lab.

Yeah i do know that! thanks

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.