Arduino Programming Language: ByteCast

Name

byte()

Description

Converts a primitive datatype to its byte representation. This equivalent to the cast operator (byte).

Syntax

byte (value)
(byte) value

Parameters

  • value: int, long, float, char, byte

Returns

byte 

Usage

Application

Examples

//they are equivalent
byte b = byte(260);
byte b = (byte) 260;


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