user11876: Convert text array/buffer to integer and string.
hi! i'm sending text to an arduino and the output of that library is a 
uint8_t array.
Atm the text send is a number between "0" and "1023"
void something(uint8_t * text){
 analogWrite(13,text);// does not work
}
/*
toInt() also not
int() not
atoi() not
invalid conversion from 'uint8_t* {aka unasigned char*}' to 'const char*'
*/

i need to convert it to an  integer or better to a uint16_t. 
As i plan to send custom commands in near future it would also be good to know how to convert that array to a string, that i then split/manipulate/parse.. whatever.
i looked in various posts but i couldn't get it to work on that simple example above. i'm new to c++
if it's needed the length is also aviable inside the function.

user4143: Your problem is that you are storing your text in an unsigned pointer (uint8_t *)instead of a signed pointer (char *).
If you change all your text types to char * then you can directly use atoi().  If you have a lot to change, though, you can just cast the unsigned pointer into a signed one (and make it const at the same time):
analogWrite(13, atoi((const char *)text));


11876: <p><strong>Convert text array/buffer to integer and string.</strong></p>

<p>hi! i'm sending text to an arduino and the output of that library is a 
uint8_t array.</p>

<p>Atm the text send is a number between "0" and "1023"</p>

<pre><code>void something(uint8_t * text){
 analogWrite(13,text);// does not work
}
/*
toInt() also not
int() not
atoi() not
invalid conversion from 'uint8_t* {aka unasigned char*}' to 'const char*'
*/
</code></pre>

<p>i need to convert it to an  integer or better to a uint16_t. </p>

<p>As i plan to send custom commands in near future it would also be good to know how to convert that array to a string, that i then split/manipulate/parse.. whatever.</p>

<p>i looked in various posts but i couldn't get it to work on that simple example above. i'm new to c++</p>

<p>if it's needed the length is also aviable inside the function.</p>
 4143: <p>Your problem is that you are storing your text in an <em>unsigned</em> pointer (<code>uint8_t *</code>)instead of a <em>signed</em> pointer (<code>char *</code>).</p>

<p>If you change all your text types to <code>char *</code> then you can directly use <code>atoi()</code>.  If you have a lot to change, though, you can just <em>cast</em> the unsigned pointer into a signed one (and make it <code>const</code> at the same time):</p>

<pre><code>analogWrite(13, atoi((const char *)text));
</code></pre>
