background image

KIPR Link Manual 

 

 

 

 

 

 

Version: BB2014.1.1 

 

Summary of Contents for KIPR Link

Page 1: ...KIPR Link Manual Version BB2014 1 1...

Page 2: ...ges to these specifications at any time without notice BOTBALL BYO BOT BOTGUY and the BOTGUY design and character are trademarks and or service marks of KISS Institute for Practical Robotics and may n...

Page 3: ...ink___________________________________ 12 1 Connect the KIPR Link to your Computer___________________________________________ 12 2 Launch the KISS IDE__________________________________________________...

Page 4: ..._____________________________________________ 34 Code _________________________________________________________________________ 34 5 Troubleshooting ____________________ 35 6 Appendices ______________...

Page 5: ...Link case which will void your warranty KIPR assumes no liability for the accuracy of these instructions and following them is strictly at your own risk regarding any damage which might occur to eith...

Page 6: ...battery and charge system Internal speaker 320 x 240 color touch screen Input and Output 1 3 axis 10 bit accelerometer software selectable 2 4 8g 8 digital I O ports hardware selectable 3 3V or 5V 8 3...

Page 7: ...sed to charge the KIPR Link The KIPR Link should only be charged when under adult supervision and should not be left on charge unattended When off the KIPR Link should reach full charge within 90 minu...

Page 8: ...ont View Side View Side View Bottom View Back View HDMI display port speaker side button power switch IR send receive Mounting holes have Lego Technic compatible spacing 8 analog ports 8 digital I O p...

Page 9: ...Link is controlled by a software component called the KIPR Link Firmware The web page at http www kipr org kiss platform link firmware specifies the most recent release its download link and instruct...

Page 10: ...rsion of the platform for Windows systems may be downloaded from http www kipr org kiss platform windows If you are using Windows XP connect the KIPR Link to the computer using the included USB cable...

Page 11: ...ngs 3 Choose Advanced Startup a Click on Restart Now 4 Click on Troubleshoot 5 Click on Advanced Options 6 Click on Startup Settings 7 Click on Restart 8 Choose option 7 9 Log in to Windows 8 10 Plug...

Page 12: ...n the KISS IDE icon to launch the KISS IDE and bring up its opening screen 3 Create a New Program The template selection screen will appear Click on the C Hello World Template to create a new program...

Page 13: ...ven in the lower left corner of the window Download the program to verify this works OK 6 Locate the Program File on the KIPR Link From the Home screen on the KIPR Link press the Programs button Your...

Page 14: ...illustrates how to use the KIPR Link library functions and the KIPR Link user interface with KIPR motors and sensors It is followed by a section that describes how to configure the camera for use with...

Page 15: ...rmation on ANSI C programming pick up an ANSI C programming guide from your local book store A recommended beginner s book is Absolute Beginner s Guide to C 2nd Edition by Greg Perry The KISS IDE on l...

Page 16: ...don t be surprised if correcting the first error listed is all that is needed To download your program to the KIPR Link click the KISS IDE Download button Since your program will need to be compiled o...

Page 17: ...ion libraries are provided in the KIPR Link Firmware which enable programmers to take advantage of the features of the KIPR Link Some of the more common functions are presented in the following sectio...

Page 18: ...ns for Sensors The two most basic library functions for using sensors with the KIPR Link are the analog10 and digital functions analog10 port Analog sensors produce a varying voltage value as resistan...

Page 19: ...y the analog10 function from an ET sensor in port 4 won t be meaningful until the pull up resistor for port 4 is disabled There are additional functions for sensors in the KIPR Link library described...

Page 20: ...l not hold its position when the port is disabled set_servo_position port position Moves the servo motor plugged into the specified port to the specified position Only position values between 0 and 20...

Page 21: ...ate with a max current draw of 1A per motor port where motor speed is regulated by using Pulse Width Modulation PWM to adjust the average power supplied to the motor Voltage at full power is 5V Each p...

Page 22: ...plied so that the motor continues moving at the specified velocity The BEMF value is periodically refreshed by briefly suspending PWM so that the motor s back EMF can be read by the KIPR Link mrp moto...

Page 23: ...ult a C language reference for a listing of codes and how they are interpreted for formatting data beep KIPR Link Library function that creates a short beep sound The C language prototypes for these t...

Page 24: ...ovide a color specification for the channel Live feed from the camera simplifies the process of determining how much of the spectrum is needed to produce blobs matching the color e g a particular part...

Page 25: ...nfiguration press the Add button and enter a configuration name This will bring the channels specification screen back up with the new configuration added to the list of defined configurations The con...

Page 26: ...ue bounding boxes around reddish colored blobs in the image When the selection corner is released to facilitate further adjustment the KIPR Link will shift the spectrum to have the current color spect...

Page 27: ...eeds to discriminate among objects having related but distinctive colors such as the orange and red objects in the above image Pressing the Done button reverts the display to the channel listing for t...

Page 28: ...e configuration and pressing the Default button KIPR Link Vision Library Functions These are commonly used vision functions for a complete list see the appendix camera_open resolution Opens the camera...

Page 29: ...the object s bounding box get_object_center channel number Returns a compound data type point2 with component values determined by the most recent camera_update The point 2 data type has 2 components...

Page 30: ...hen at its midpoint position 1024 it points at the center of the camera s field of view Motors can be directly manipulated from the KIPR Link interface which for servos provides a means for determinin...

Page 31: ...ly centered on the camera s field of vision this program rotates the servo to keep it pointing towards the largest object for color channel 0 as the object is moved about int main int offset x y enabl...

Page 32: ...r half a green motor light will come on Set Up Attach the camera to the KIPR Link You need to set the color model on channel 0 to track an object you can move in front of the camera the more saturated...

Page 33: ...nter x data y get_object_center 0 0 y and y data if get_object_count 0 0 there is a blob in view display_printf 0 1 Center of largest blob d d x y ao turn off all motor lights determine the horizontal...

Page 34: ...Assume channel 1 is for identifying QR codes If a QR code is found it is translated int main int i lngth camera_open LOW_RES activate camera camera_update get most recent camera image and process it w...

Page 35: ...k comes on but only loads to the splash screen and keeps rebooting continuously This behavior indicates the KIPR Link Firmware has been corrupted Reload the most current version of the Firmware See Ap...

Page 36: ...plugged in and functioning since powering on the KIPR Link should cause your PC to establish the USB connection If you are still having issues try a different USB port My KIPR Link is not recognized...

Page 37: ...et devmgr_show_nonpresent_devices 1 Step 3 Enter start devmgmt msc to bring up Device Manager Step 4 In Device Manager under View select Show Hidden Devices Step 5 Expand the COM port listing right cl...

Page 38: ...USB flash drive on a Mac OSX right click on the USB drive icon and choose Eject For Windows machines under Computer right click on the USB drive icon and choose Eject This procedure protects the USB d...

Page 39: ...serial port the official cable has a keyed plug but a header plug will also work if red orientation is observed The power plug is optional and if used when the iRobot Create is turned on will trickle...

Page 40: ...nd For this reason movement commands may be placed in tight loops without concern of overwhelming the serial connection The iRobot Create s trajectory will continue until a different movement command...

Page 41: ...zes the distance accumulation in mm to the specified value get_create_distance Returns the distance in mm that the center of the iRobot Create has traveled since the distance accumulation was last ini...

Page 42: ...ink are independent entities communicating via a serial connection If the connection is lost the iRobot Create will continue on its own according to the last command it received The relatively slow na...

Page 43: ...in front of the iRobot Create Note that if the iRobot Create detects a ledge with the cliff or wheel drop sensors like being picked up the program will stop and the iRobot Create will play a sad tone...

Page 44: ...disables serial communications until the script has finished The iRobot Create has several built in scripts mostly to serve the needs of its cousin the iRobot Roomba The Open Interface provides byte...

Page 45: ...command speed radius follow create_write_byte speed 8 send bits 8 15 of speed create_write_byte speed and then send bits 0 7 create_write_byte 128 send hex 80 X8000 specs drive straight create_write_...

Page 46: ...s not provide for individual control of drive motors Byte code 145 is a drive command for providing direct control where the two 16 bit two s complement integers that immediately follow it specify rig...

Page 47: ...resent which has the effect of preventing the script from moving the Create 3 A script can control the Create whether or not the KIPR Link that provided the script remains attached For example if a us...

Page 48: ...plied to its anode lead rises above a prescribed level typically between 1 9 and 3 2V depending on color If too much current is passed through the LED it will burn out the typical spec is 20 30mA For...

Page 49: ...ariables The global variables can be used as semaphores so that one process can signal another Process IDs may also be stored in global variables so that one process can destroy another one s thread i...

Page 50: ...ath or its file system hasn t been mounted e g the USB drive has not been plugged in Both cases are illustrated in the following program for a USB drive plugged into a KIPR Link The example otherwise...

Page 51: ...tring to chkf fprintf f d data now send formatted numeric data using fprintf fclose f close the file to make sure the output is sent now read it back f fopen chkf r it exists since we just created it...

Page 52: ...is Vcc which is set at 5V and Row 3 ground is GND Adjusting jumper settings to alter rail voltage requires opening the case voiding your warranty if this is something you have questions about call KIP...

Page 53: ...late the leads to prevent any cross contact KIPR sensors use hot melt glue for this purpose which also stabilizes the connection and provides strain relief to flatten the glue before it hardens sandwi...

Page 54: ...using a battery For Pin 1 negative and Pin 3 positive the green motor light is lit when the motor is powered If the polarity is reversed Pin 1 and Pin 3 then the red motor light is the one lit By con...

Page 55: ...n 3 To make the connection between motor and plug form leads by separating the wires a small amount on each end of the cable then strip off enough insulation to be able to solder the leads to your mot...

Page 56: ...Store https botballstore com will function properly for either setting but that may not be true for sensors you construct yourself Before opening your KIPR Link case make sure your work area is stati...

Page 57: ...indicated by the values printed on the circuit board In the picture below the analog ports are set for 3 3V and the digital ports for 5V Step 4 Turn the top of the case back over and carefully reinsta...

Page 58: ...ccel_z Category Sensors Format int accel_z Returns the value of the accelerometer for its vertical or z direction relative to the horizontal plane of the KIPR Link When the Link is horizontal it is ca...

Page 59: ...Turns motor m on full speed in the backward direction Example bk 1 block_motor_done Category Motors Format void block_motor_done int m Function does not return until specified motor completes any exec...

Page 60: ...ding from the digital hardware if the reading is zero volts or logic zero the digital function will return true Valid for digital ports 8 15 only disable_servo Category Servos Format void disable_serv...

Page 61: ...MF a typical discrimination for a given motor is on the order of 1100 position ticks per rotation get_pid_gains Category Motors Format int get_pid_gains int motor int p int i int d int pd int id int d...

Page 62: ...os to curr_pos ticks The speed range is 0 to 1000 ticks per second Example move_relative_position 1 275 1100L move_to_position Category Motors Format void move_to_position int m int vel int pos Moves...

Page 63: ...int pullupTF The purpose of this function is to enable or disable the pull up resistor present on each analog port Without the pull up resistor the port is said to be floating For example set_analog_...

Page 64: ...the actual coefficients can be floats If a motor is jerky the P and D terms should be reduced in size If a motor lags far behind they should be increased The default values are set at firmware instal...

Page 65: ...tion is run in a thread via thread_start the thread will remain active until the function finishes or the thread is destroyed via thread_destroy If the thread hasn t been destroyed it can be started a...

Page 66: ...n extra button Use extra_buttons_show to show the X Y and Z buttons See also extra_buttons_hide get_extra_buttons_visible y_button_clicked Category Sensors Format int y_button_clicked Gets the Y butto...

Page 67: ...era at a time can be used and the default configuration is selected A resolution of one of LOW_RES MED_RES HIGH_RES needs to be specified Returns 1 on success 0 on failure See also camera_open camera_...

Page 68: ...Category Vision Format double get_object_confidence int channel int object Returns the confidence between 0 0 and 1 0 that the given object on the given channel is significant If the channel or object...

Page 69: ...stores the Create to power on configuration which will also shut off any running motors create_read_block Category Create Serial Interface Format int create_read_block char data int count Uses the ser...

Page 70: ...t r_speed int l_speed Specifies individual left and right speeds in mm sec create_drive_straight Category Create Movement Function Format void create_drive_straight int speed Drives straight at speed...

Page 71: ...cent movement command executed get_create_requested_velocity Category Create Movement Function Format int get_create_requested_velocity Returns the speed the Create is moving 500 to 500mm s according...

Page 72: ...pressed 0 otherwise get_create_lcliff Category Create Sensor Function Format int get_create_lcliff Returns 1 if the left cliff sensor is over a surface that doesn t reflect IR e g black or over a cli...

Page 73: ...r analog reading as a 12 bit value 0 to 4095 get_create_rwdrop Category Create Sensor Function Format int get_create_rwdrop Returns 1 if right wheel has dropped 0 otherwise get_create_vwall Category C...

Page 74: ...ipt Format void create_spot Simulates a Roomba doing a spot clean create_cover Category Create Built In Script Format void create_cover Simulates a Roomba covering a room create_demo Category Create B...

Page 75: ...the number of the song currently selected 0 to 15 get_create_song_playing Category Create Music LED Function Format int get_create_song_playing Returns 1 if a song is playing 0 otherwise create_load_...

Reviews: