About 17,000 results
Open links in new tab
  1. How to return Char Array Value in Arduino IDE Function?

    Aug 18, 2019 · char char_array[str_len]; is local to the function - it is created on function entry and its memory is released on function exit. The contents of that memory are undefined once it has been …

  2. How to get char array's length - Arduino Stack Exchange

    How to get char array's length Ask Question Asked 5 years, 11 months ago Modified 5 years, 11 months ago

  3. Clear existing array when getting new serial command

    I get serial data from the console and store it in a char array called "data". Then, when I send a new console message to the Arduino, I want it to clear the existing "data" array and store only the new …

  4. String to char array conversion - Arduino Stack Exchange

    If you're trying to use a method of a in the global scope, that's doomed to failure. You can only call methods within functions. If all you want is a char array with "45317" in it then just use: char *b = …

  5. How can I get Serial.print to print a variable thats a char? - Arduino ...

    I'm trying to write a function as part of my code, and the function basically has to write the name of a parameter, but I can't get it to print properly to the screen. Here is what I've got: void

  6. arduino uno - Difference between char array and unsigned char array ...

    Feb 10, 2021 · It’s recommended to only use char for storing characters. For an unsigned, one-byte (8 bit) data type, use the byte data type. So size wise an array of chars and unsigned chars are going to …

  7. Number of elements in an array char - Arduino Stack Exchange

    Feb 14, 2020 · What kind of function can I use to know how many elements are in an array char? sizeof() gives the number of 'spaces' available so it doesn't work for me.

  8. Printing the array using print and serial write function in Arduino Uno

    Jul 29, 2021 · I have, one program with only using printing array and other with serial write and print function for the array, while using serial write and print function I get these extra characters between …

  9. arduino mega - Convert int to char [] - Arduino Stack Exchange

    17 I'm looking to convert an int value to a char array. currently I've found the following will return [number] int num = [number] str = String(num); str.toCharArray(cstr,16); Serial.println(cstr); However, …

  10. How do I convert a float into char*? - arduino uno

    Aug 1, 2016 · There is a function in the standard Arduino library called dtostrf(). I think of it as "Decimal to String Float". You pass in the float, how wide you want the whole number to be (if it will fit), the …