Recent Posts



[Project] Robotic drawing with the new Linkbot Sketch Pack!

The new Linkbot Sketch Pack adds fun drawing capabilities to Linkbot robots! Program the Linkbot to create all kinds of shapes and patterns as it moves over a paper or whiteboard surface, lowering the pen to draw and raising it to move to another area without drawing.

The following program, written in Ch code, shows how to control the Linkbot so that it traces out a square. (PDF file with code available here.)

/* Square Drawing Demo

This demo shows how to program the robot to draw a square by using a pen with the Linkbot Sketch Pack accessories. Note that there are two adjustment factor variables (turn_adjfactor and line_adjfactor) that need to be specified, depending on the surface being used. (Trial and error required for best results.) */

#include <linkbot.h>

// Initialize the robots (#1 for driving, #2 for raising/lowering pen) CLinkbotI robot1, robot2;

// Define variables int pen_angle = 30; // the pen angle through which the pen is raised and lowered int robot_to_pen_distance = 5; // the distance between the center of the driving robot and the pen position int side_length = 5; // the side length of the square to be drawn int count = 0; // counter for loop int turn_angle = 90; // the angle through which the robot will turn at each corner