- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- 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.
Syntax
The syntax is −
word(var)
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.
Syntax
The syntax is −
word(highByte, lowByte)
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.
- Related Articles
- How to Use isControl() in Arduino?
- How to Use isGraph() in Arduino?
- How to use F() macro in Arduino?
- How to Use Static Variables in Arduino?
- How to Use Volatile Variables in Arduino?
- What is a Word in Arduino?
- How to use the Autocomplete feature in Arduino IDE 2.0?
- How to use PROGMEM in Arduino to store large immutable data?
- How to use microsoft keyboard app word flow
- How to Use Light Dependent Resistor (LDR) with Arduino?
- How to Use a Serial Monitor with Arduino IDE 2.0?
- How to use clock() function in C++
- How to use deleteOne() function in MongoDB?
- How to use function Alias in PowerShell?
- How to use Lambda Function in Python?

Advertisements