Вы находитесь на странице: 1из 4

Introduction

This tutorial will show you how to write and download your first program into the RoboRobo Black Line Pro robot kit on a PC running Windows 7 (win7).

You will need


The current version of the WinAVR software driver can be found on the CDROM included with the robot kit in a folder called program install file. A RoboRobo Black Line Pro robot kit.

Follow these steps


Copy the 2010ProR V10.03.10 folder (and contents) from the CDROM included with the Black Line Pro robot kit on to your computer to continue. Right-click the 2010ProR V10.03.10 folder; then Click Properties from the menu that appears; then Unselect Read-only (Only applies to files in folder)l then Click OK to continue. Note: this is to ensure the files in this folder is read and write enabled. Double-click the AVRStudio,exe icon to run the AVRStudio software which has been previously installed on your computer to continue. Click Open to continue. Select ProR.aps which is located in the 2010ProR V10.03.10 folder to continue. Click + next to Source Files to display the contents of the folder; then Double-click main.c to continue. Note this will display the main.c file shown here. The code shown here is an English translation of the main.c code with the addition of 2 lines of code that contain specific instructions;

Line 46 tells the robot to turn on the buzzer and LEDs; and Line 47 tells the robot to rotate right.

Ensure you include the contents of lines 46 and 47 into main.c before proceeding.
1 2 3 4 5 6 7 /*======================Copyright (c) 2010, Roborobo=========================== Project Name : 2010 ProR MCU Type : ATmega64A Date : 2010. 03. 10 By : ohtaeyoung, Cho, Moon Support E-mail :%MINIFYHTML5e945f192aec7a0d5059c29bc62ed5e632%%MINIFYHTML5e945f192aec7a0d5059c29bc6

8 9 1 0 1 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 2 0 2 1 2 2 2 3 2 4 2 5 2 6 2 7 2 8 2 9 3 0 3 1 3 2 3 3 3 4 3 5 3 6 3 7 3 8 3 9 4

2ed5e633%This e-mail address is being protected from spambots. You need JavaScript enabled to view it%MINIFYHTML5e945f192aec7a0d5059c29bc62ed5e634%%MINIFYHTML5e945f192aec7a0d5059c29bc 62ed5e635%%MINIFYHTML5e945f192aec7a0d5059c29bc62ed5e636%This e-mail address is being protected from spambots. You need JavaScript enabled to view it%MINIFYHTML5e945f192aec7a0d5059c29bc62ed5e637% Support OS : WindowsXP, WindowsVista, Windows7 Program Version : AVR Stuido 4.18 (Build 692) , WinAvr20100110 more Web Site : www.roborobo.co.kr Please keep the program version. Windows XP, Windows VISTA, Windows 7 compatible. Black Line ProR is the only program. Please always refer to the manual and programmed. ==============================================================================*/ #include #include #include #include #include #include #include <avr/io.h> <avr/interrupt.h> <stdio.h> <stdarg.h> <stdlib.H> <proR/proBasic.h> <proR/blueTooth.h>

int main(void) { //Here is a function of the settings below. start(1,500); // Declare the initial operation of the robot (1: Using Debug buzzer, 0: disabled) (crossTimer setting time) motorspeed(BREAK); // Motor brake mode selector (Break the class stopped, STOP Stop the wells) linecolor(BLACK); // Line color selection (BLACK: when the black line, WHITE when the white line) sensor(FRONT); // In front or behind the sensor, select Sensor (FRONT: front sensor using the sensor rainteu Racing, REAR: Rear sensor using the sensor rainteu Racing) ffspeed(0,0); // For the sake of both the straight forward direction, motor speed tuning (front left motor, right motor forward) bbspeed(0,0); // Reverse the direction of both motors go straight for the sake of speed tuning (Motor rear left, rear right motor) driver(20,15,10,5); // Set the robot's straightness (normal driver settings) hdriver(20,5,0,0); // Linedline, linetline only (a car-driver settings) ldriver(20,15,8,0); // Linedline, linetline only (2nd driver settings) error(0, 5000); // Sensor value given the same value detection sensor hour operation receives an error (1: Error function, operation, 0: Disable error function) (error detection time setting function) savetime(1); // Function to check the time that the behavior of (0: save time, set the Disabled, 1: Cumulative Time Set 2: relative time setting) linepush(0,500,20); // Line of work, such as sensor values during the waiting time to enter an expression increased up to speed (0: Disable the line push, 1: disabled) (started to) (maximum speed) turnpush(0,500,20); // Turn work with the same values of the atmospheric sijandongan sensor input to the maximum speed increases by 1 (0: Disable teonpuswi, 1: disabled) (started to) (maximum speed) //Start of functional program buzzerled(1,1,2,500); motor(20,-20,1000);

0 4 //End of functional program 1 end(); //end robot motion 4 return 0; 2 } 4 3 4 4 4 5 4 6 4 7 4 8 4 9 5 0 5 1

Click the Build icon located above the main.c window to continue. Note: build can also be triggered with the F7 key or by selecting Build from the Build menu. If there are no errors with the program, the software will display the message Build succeeded with 0 Warnings in the message window normally located below the main.c window. Click the AVR icon located above the main.c window to continue. Click the tab labelled Main; then Click the drop-down list button; then Click ATmega64A to continue. Note: this will set the programmable chip type to ATmega64A. Click the tab labelled Program; then Click the open file button to continue. Open the 2010ProR V10.03.10 folder which was copied previously; then Open the folder labelled default; then Select the file labelled ProR.hex; then Click Open to continue. Click Program to continue. Note: this will instruct the software to upload the program to the robot.

If there are no errors with the program, the software will display the message Leaving programming mode.. OK! and the robot will beep twice to complete.

Вам также может понравиться