Introduction to Robot C


Getting Started

Connext your Robot to Robot C

Open sample program and upload to Robot

The Structure of Robot C Program

► #pragma

This area defines the robot system

► Includes

References to external Library code

► Global Variables

Variable available to all functions

►User-defined Functions

Variables defined inside a function are scoped as local and only visible to the function of origin

► task main() { // the nuts and bolts }

► conditions, Variables , Constants  Statements and Functions

→ Conditions

→ Variables Consist  of Three Parts

Data Type   Assigned to Value

int x=0;

→ Constant

const  float pi=3.14159265

/ *********************************************/→ Functions

void myFunction(){ // has no return vale or inpit





/ *********************************************/

int myFunction2(){ // has no return vale or inpit


float pi=3.14159265;



return pi;


/ *********************************************/


C Operators

► Control Structures

Sample Code