Coding With Arduino
Coding With Arduino
EMBEDDED C
What is Embedded C?
Embedded C is nothing but a subset of C
language which is compatible with certain
microcontrollers.
Some features are added using header files like
<avr/io.h>, <util/delay.h>.
scanf() and printf() are removed as the inputs are
scanned from the sensors and outputs are given
to the ports.
Control structures remain the same like ifstatement, for loop, do-while etc.
If-statement
Syntax:
if( condition)
{
statement.
}
else
{
statement..
}
For- statement
Syntax:
For( initial counter; test condition; update stmt)
{
statement..
statement...
}
Program:
for(int i=0;i<5;i++)
sprintf(str, Hello Robosapiens);
Coding
window
Compile
Status
If there is no error
in the code the
compile
succeeded
without any error.
THANK YOU