- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to Use Word() Function in Arduino?
The word() function converts a variable of any data type to the word data type. It is essentially a cast function.
The syntax is −
Where var is a variable of any datatype.
Alternatively, you can also construct a word by specifying two bytes, the higher byte and the lower byte.
The syntax is −
For instance, word(2,5) will return 517 (2 is 0b00000010 and 5 is 0b00000101; word(2,5) will return 0b0000001000000101, which equals 517).
You can try out other combinations of characters and data types. You can read more about the word function from Arduino’s official documentation here.
- How to Use isGraph() in Arduino?
- How to Use isControl() in Arduino?
- What is a Word in Arduino?
- How to use F() macro in Arduino?
- How to Use Static Variables in Arduino?
- How to Use Volatile Variables in Arduino?
- How to use microsoft keyboard app word flow
- How to use the Autocomplete feature in Arduino IDE 2.0?
- How to Use Light Dependent Resistor (LDR) with Arduino?
- How to use PROGMEM in Arduino to store large immutable data?
- How to Use a Serial Monitor with Arduino IDE 2.0?
- How to use Lambda Function in Python?
- How to use clock() function in C++
- How to use deleteOne() function in MongoDB?
- How to use function Alias in PowerShell?