Codes

Coding Definitions


Code

Functions

/* */

This means whatever is between the slashes are comments only

Printf (“Hello, world\n”);

Printf means that whatever is between quotes will be shown on the screen. Every line of code needs to end with a;

#include<linkbot.h>

This means we are using a robot

ClinkbotI robot;

Connect to this type of robot.(I orL)

robot.setLEDColor(blue);

Changes the color of the LED light

robot.driveDistance(10,1.75)

Moves the robot forward 10 inches (1.75) is the wheel radius

robot.turnLeft(90, 1.75,2.69)

Degrees you want it to turn, radius,trackwidf

robot.turnright(90, 1.75,2.69)

Degrees you want it to turn, radius,trackwidf

Robot.driveAngle(360);


Robot driveTime(5);

Robot drives for a certain amount of time

robot.setBuzzerFrequency(450,1.5);

Turns on the robot buzzer with a specified frequency (HZ) for a time duration