Arduino Programming Language: HighByte

Name

highByte()

Description

HighByte returns the higher Byte(that is leftmost) of a variable to 2byte(16bit) or the second lowest byte of a larger data type.

Syntax

highByte(wordValue)

Parameters

  • wordValue is an unsigned int

Returns

byte 

Usage

Application

Examples

unsigned int x = 1022; // word (16 bit or two bytes) variable, 0x03FE in Hexadecimal 
byte hb = highByte(x); // sets lb with the lower byte of x: 0x03


Based on the reference originally written by Arduino Community,  wiring.org.co and  arduino.cc