noob here i need help to decode a mesage into smaller chunks

im making a car with arduino and using a 433 hz transmitter and reciver and i want to say to it wat to do in one line of sending a message but i dont know how to decode it into smaller chunks as commands

Welcome to the forum

Much more detail of your project and what you want to do is needed

It sounds like you want to send a series of commands to the car and have it decode them into individual commands. If so then take a look at Serial input basics - updated

If that is not what you want then please give full details and post any code that you already have

Please follow the advice on posting code given in Read this before posting a programming question in order to make your sketch easy to read, copy and test

In particular note the advice to Auto format code in the IDE and to use code tags when posting code here as it prevents some combinations of characters in code being interpreted as HTML commands such as italics, bold or a smiley character, all of which render the code useless

If the code exceeds the 9000 character inline limit then attach it to a post

Arduino provides String functions to find separators and take substrings.
My SafeString library has similar functions (and more) that use char[]'s underneath but protect you from buffer overruns
Here is some code that breaks a CSV String up into 'fields' separated by , using Arduino Strings

   // assuming you radio returns a null terminated char[] called radioData
   // you may need to add the '\0' yourself to the end of radioData
   String data =  radioData;
  // looking for ,
  data += ','; // add a trailing , to simplify the logic
  int endIdx = 0; int startIdx = 0;
  while ((endIdx = data.indexOf(',', startIdx)) >= 0) { // not -1 i.e found ,
    String field = data.substring(startIdx, endIdx);
    Serial.println(field);
    startIdx = endIdx + 1; // skip the ,
  }

SafeString has similar functions.
See the example files in the SafeString library for lots of code examples.

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