Arduino Programming Language: IntCast

Name

int()

Description

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

Syntax

int (value)
(int) value

Parameters

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

Returns

int 

Usage

Application

Examples

//it sets i to 3
int i = int(3.1415);


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