Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 16780

Identifies the size and nature of information held by a variable in a program. It is language-dependent. Examples for C/C++ include: `int`, `float`, and `char`.

2 votes
Accepted

double to char* conversion. Weird results from dtostrf

If len is the text array size, you need space there for the terminating '\0'. So the second paramater to dtostrf has to be smaller than len.
DataFiddler's user avatar
  • 1,045
0 votes

Why does Arduino IDE recommend storing 0-255 numbers in "byte" instead of "char"?

Just a little add-on to Majenko's answer: If a function has a char* parameter, it's usually expecting a zero-terminated text. If a function has a byte* parameter, it's usually any binary data, event …
DataFiddler's user avatar
  • 1,045
2 votes

Can I use 1-byte datatypes to store digital input?

I did not check the internals a while, but in early days there was a #define HIGH 1 meaning that HIGH is a const int. Perhaps someone did not want to disable some TRI-STATE digital logic in the …
DataFiddler's user avatar
  • 1,045
2 votes

What is the best data type to be used through i2C

I2C works with fixed size byte arrays. Single bytes for commands should be sufficient. For positions you might need int16_t or even bigger numbers. Unsigned positions relative to (above) zero might m …
DataFiddler's user avatar
  • 1,045