Arduino Programming Language: FloatCast

Name

float()

Description

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

Syntax

float (value)

Parameters

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

Returns

float 

Usage

Application

Examples

//it sets i to 3.1415
float i = float(3.1415);


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