Useful Codes for C/C++ Beginners

IA Kit Doc

Internal Memory

Appliance Control

Project

Useful Codes for C/C++ Beginners

Common Questions

  1. Why can't I print message on Serial monitor?

    Tips: Please double check if you write Serial.begin(115200), already inside void setup().

void setup { 
  Serial.begin(115200); // write this code here 
}

void loop {
  Serial.println("Your Message"); // write your debug message here!
}


Core Functions (Serial)

Serial.available()

This function returns the number of bytes available to read.

When to use? To check if any data sent to IA Kit.

if(Serial.available()==0){
  Serial.println("Yeah, I received message from my user!");
}

Serial.parseInt()

Always helpful when you're asking users to input a number (type::int) for a specific task.

line 1: wait for user to input a number / send data to IA Kit via Serial communication

line 2: create a integer variable, assigning user input data (integer) to variable a

while(Serial.available()==0){} // line 1
int a = Serial.parseInt(); // line 2

Serial.parseFloat()

Another always helpful function when you need a number (type::float) for a specific task.

line 1: wait for user to input a number / send data to IA Kit via Serial communication

line 2: create a float variable, assigning user input data (float) to variable b

while(Serial.available()==0){} // line 1
float b = Serial.parseFloat(); // line 2

© 2025 INCIPE Academy Limited

Create a free website with Framer, the website builder loved by startups, designers and agencies.