Arduino Programming Language: Char

Name

char

Description

The char type stores characters in the ASCII format. 
You can initialize it inserting the char with single quotes or through the corrispodent number ASCII value. 
Each char occupies one byte (8bits). 
Char is a signed type then it encodes numbers from -128 to 127.

Syntax

char var
char var = value

Parameters

  • var: variable name
  • value: any character or equivalent ASCII number

Usage

Application

Examples

char CharC= 'C';
char CharC= 67; //are equivalent


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