Unsigned Char | Arduino Reference

  • TUTORIALS
  • HARDWARE & TOOLS
  • REFERENCES
  • FAQs
  • ABOUT US
Home References Language References
  • English
  • |
  • Deutsch
  • |
  • Português
  • |
  • 한국어
  • |
  • Español

Sketch

  • Function
  • loop()
  • setup()

Control Structure

  • break
  • continue
  • do while
  • if else
  • for
  • goto
  • if
  • return
  • switch...case
  • while

Further Syntax

  • /* */ (block comment)
  • {} (curly braces)
  • #define (define)
  • #include (include)
  • ; (semicolon)
  • // (single line comment)

Data Types

  • array
  • bool
  • boolean
  • byte
  • char
  • double
  • float
  • int
  • long
  • short
  • size_t
  • string
  • String()
  • unsigned char
  • unsigned int
  • unsigned long
  • Variable
  • void
  • word

Constants

  • constants
  • Floating Point Constants
  • Integer Constants

Variable Scope & Qualifiers

  • const
  • scope
  • static
  • volatile

Digital IO

  • digitalRead()
  • digitalWrite()
  • pinMode()

Analog IO

  • analogRead()
  • analogReference()
  • analogWrite()

Advanced IO

  • noTone()
  • pulseIn()
  • pulseInLong()
  • shiftIn()
  • shiftOut()
  • tone()

Serial

  • Serial
  • Serial.available()
  • Serial.availableForWrite()
  • Serial.begin()
  • Serial.end()
  • Serial.find()
  • Serial.findUntil()
  • Serial.flush()
  • Serial.getTimeout()
  • if(Serial)
  • Serial.parseFloat()
  • Serial.parseInt()
  • Serial.peek()
  • Serial.print()
  • Serial.println()
  • Serial.read()
  • Serial.readBytes()
  • Serial.readBytesUntil()
  • Serial.readString()
  • Serial.readStringUntil()
  • serialEvent()
  • Serial.setTimeout()
  • Serial.write()

Stream

  • Stream
  • Stream.available()
  • Stream.find()
  • Stream.findUntil()
  • Stream.flush()
  • Stream.getTimeout()
  • Stream.parseFloat()
  • Stream.parseInt()
  • Stream.peek()
  • Stream.read()
  • Stream.readBytes()
  • Stream.readBytesUntil()
  • Stream.readString()
  • Stream.readStringUntil()
  • Stream.setTimeout()

String Functions

  • String.c_str()
  • String.charAt()
  • String.compareTo()
  • String.concat()
  • String.endsWith()
  • String.equals()
  • String.equalsIgnoreCase()
  • String.getBytes()
  • String.indexOf()
  • String.lastIndexOf()
  • String.length()
  • String.remove()
  • String.replace()
  • String.reserve()
  • String.setCharAt()
  • String.startsWith()
  • String.substring()
  • String.toCharArray()
  • String.toDouble()
  • String.toFloat()
  • String.toInt()
  • String.toLowerCase()
  • String.toUpperCase()
  • String.trim()

String Operators

  • String += (append)
  • String == (comparison)
  • String + (concatenation)
  • String != (different from)
  • String [] (element access)
  • String > (greater than)
  • String >= (greater than or equal to)
  • String < (less than)
  • String <= (less than or equal to)

Keyboard

  • Keyboard
  • Keyboard.begin()
  • Keyboard.end()
  • Keyboard Modifiers
  • Keyboard.press()
  • Keyboard.print()
  • Keyboard.println()
  • Keyboard.release()
  • Keyboard.releaseAll()
  • Keyboard.write()

Mouse

  • Mouse
  • Mouse.begin()
  • Mouse.click()
  • Mouse.end()
  • Mouse.isPressed()
  • Mouse.move()
  • Mouse.press()
  • Mouse.release()

Time

  • delay()
  • delayMicroseconds()
  • micros()
  • millis()

Math

  • abs()
  • constrain()
  • map()
  • max()
  • min()
  • pow()
  • sq()
  • sqrt()

Characters

  • isAlpha()
  • isAlphaNumeric()
  • isAscii()
  • isControl()
  • isDigit()
  • isGraph()
  • isHexadecimalDigit()
  • isLowerCase()
  • isPrintable()
  • isPunct()
  • isSpace()
  • isUpperCase()
  • isWhitespace()

Bits and Bytes

  • bit()
  • bitClear()
  • bitRead()
  • bitSet()
  • bitWrite()
  • highByte()
  • lowByte()

Arithmetic Operators

  • + (addition)
  • = (assignment operator)
  • / (division)
  • * (multiplication)
  • % (remainder)
  • - (subtraction)

Bitwise Operators

  • << (bitshift left)
  • >> (bitshift right)
  • & (bitwise and)
  • ~ (bitwise not)
  • | (bitwise or)
  • ^ (bitwise xor)

Boolean Operators

  • && (logical and)
  • ! (logical not)
  • || (logical or)

Comparison Operators

  • == (equal to)
  • > (greater than)
  • >= (greater than or equal to)
  • < (less than)
  • <= (less than or equal to)
  • != (not equal to)

Compound Operators

  • += (compound addition)
  • &= (compound bitwise and)
  • |= (compound bitwise or)
  • ^= (compound bitwise xor)
  • /= (compound division)
  • *= (compound multiplication)
  • %= (compound remainder)
  • -= (compound subtraction)
  • -- (decrement)
  • ++ (increment)

Conversion

  • byte()
  • char()
  • float()
  • int()
  • long()
  • (unsigned int)
  • (unsigned long)
  • word()

Random Numbers

  • random()
  • randomSeed()

Trigonometry

  • cos()
  • sin()
  • tan()

External Interrupts

  • attachInterrupt()
  • detachInterrupt()

Interrupts

  • interrupts()
  • noInterrupts()

Utilities

  • PROGMEM
  • sizeof()

Pointer Access Operators

  • * (dereference operator)
  • & (reference operator)

Zero, Due, MKR Family

  • analogReadResolution()
  • analogWriteResolution()
unsigned char

Description

An unsigned data type that occupies 1 byte of memory. Same as the byte data type.

The unsigned char data type encodes numbers from 0 to 255.

For consistency of Arduino programming style, the byte data type is to be preferred.

Syntax

unsigned char var = val;

Parameter Values

  • var: variable name.
  • val: the value to assign to that variable.

Example Code

unsigned char myChar = 240;

See Also

  • Language : array
  • Language : bool
  • Language : boolean
  • Language : byte
  • Language : char
  • Language : double
  • Language : float
  • Language : int
  • Language : long
  • Language : short
  • Language : size_t
  • Language : string
  • Language : String()
  • Language : unsigned int
  • Language : unsigned long
  • Language : void
  • Language : word
  • Language : Serial.println

ARDUINO BUY RECOMMENDATION

Arduino UNO R3
Arduino Starter Kit
Disclosure: Some links in this section are Amazon affiliate links. If you make a purchase through these links, we may earn a commission at no extra cost to you.Additionally, some links direct to products from our own brand, DIYables .

※ OUR MESSAGES

  • We are AVAILABLE for HIRE. See how to hire us to build your project
PREVIOUS NEXT DISCLOSURE ArduinoGetStarted.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com, Amazon.it, Amazon.fr, Amazon.co.uk, Amazon.ca, Amazon.de, Amazon.es, Amazon.nl, Amazon.pl and Amazon.se The Arduino Reference text is licensed under a Creative Commons Attribution-Share Alike 3.0 License. The content is modified based on Official Arduino References by: adding more example codes and output, adding more notes and warning, rewriting some parts, and re-formating Email: [email protected] ×

Tag » Arduino Byte Data Type Char