Byte

The byte data type is an 8-bit numerical value that ranges from 0 to 255. The following shows how we would declare a variable of the byte type:

byte myByte = 128;

The preceding code declares a variable named myByte of the byte type with an initial value of 128.

Get Mastering Arduino now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.