Shop OBEX P1 Docs P2 Docs Learn Events
Project help PLEASE — Parallax Forums

Project help PLEASE

czs0024czs0024 Posts: 4
edited 2010-11-28 14:06 in Accessories
for our project, we are using the colorpal sensor. we have to program a boe-bot to use the colorpal sensor to follow a green line of electrical tape. however, we were given no other instructions and we have only done basic stamp once before. i found the section in the manual on how to follow a black tape line using different sensors, but cannot find anything on our project. any help would be GREATLY appreciated.

Comments

  • ElectricAyeElectricAye Posts: 4,561
    edited 2010-11-05 15:33
    If you look at the ColorPal product page, you'll find some documentation and sample code. Have you looked at this yet?

    http://www.parallax.com/StoreSearchResults/tabid/768/txtSearch/colorpal/List/0/SortField/4/ProductID/617/Default.aspx
  • czs0024czs0024 Posts: 4
    edited 2010-11-11 13:46
    Thank you, i read those and saw the parts about detecting color and programming it to display a certain LED color, but I cannot translate this into making it follow the green line. I have zero experience programming and only know the basic stamp functions to make it pause and turn left and right.
  • Mike GreenMike Green Posts: 23,101
    edited 2010-11-11 16:02
    It sounds like you need to learn to program and you need to study the examples using other sensors so you can adapt them to use the ColorPAL. You won't find a ready made example for what you want and this sounds like a class project as well.

    If you haven't looked at it, download and read through the "Robotics with the BoeBot" tutorial. It sounds like you've seen some of the examples in that, but you may need to work through some of the exercises so you understand what they're doing and how.
  • ercoerco Posts: 20,255
    edited 2010-11-11 16:47
    Are there multiple tape colors besides green to distinguish from, or is it just green tape on a solid color background? BIG difference. You may need several colorpal sensors if it's the former.
  • jake65jake65 Posts: 1
    edited 2010-11-17 08:44
    I'm having the same problem and yes it is only one green line of electrical tape. He just gave us he project and turned us loose and I am totally lost in programming the colorpal senor as well as writing a program to run for the boe-bot to follow the green line any help would be appreciated
  • ercoerco Posts: 20,255
    edited 2010-11-17 11:18
    Piece of cake, guys; just a hardware tweak. If you have to follow a green tape line instead of a black tape line, then all you have to do is adjust your sensors for the contrast difference. The existing software is all written for you. You don't even need a Colorpal, you could probably tweak the BoeBot's regular QTI sensors.
  • czs0024czs0024 Posts: 4
    edited 2010-11-28 11:15
    erco, thanks, could you be a little more specific? We are told we have to use the colorpal sensor. we used the pre-supplied codes and it just wont do anything. any more help would be greatly appreciated, as we are quickly running out of time.
  • Mike GreenMike Green Posts: 23,101
    edited 2010-11-28 14:06
    Step 1) Hook up your ColorPAL. Set up the ColorPAL BS2 Color Matching program and find out what color values (RGB) you get with your green tape at the distance you plan to use from the sensor. Also find out what color values you get with the floor, maybe several possible floors

    2) Experiment with the Color Matching program until you understand how it works and how the sensor works

    3) Look at Chapters 6, 7, and 8 in the Robotics tutorial. These cover navigation using the existing photoresistors and the IR distance sensors. Exercise #3 in Chapter 8 specifically covers following a stripe on the floor. Instead of getting a distance measurement using IR (actually measuring the intensity of the reflected IR), you'll get a measurement of the intensity at the color of the tape and, if it's different enough in color from the tape, the intensity at the color of the floor. If you're using two ColorPALs, the rest of the logic is the same. If you're using only one ColorPAL, you'll have to turn the BoeBot from side to side to see where the edge of the tape is each time you move forward a little bit and lose the tape.

    Since this is a school project, you'll have to do most of the work yourself using what resources are available in the documentation for the BoeBot and ColorPAL. If you have specific questions or specific things you don't understand after looking at the documentation, feel free to ask, but give as much information as possible. Include a copy of your program as an attachment to your message. Describe what your BoeBot is doing, not just what it isn't doing. Check your wiring. Use the DEBUG statement to look at your program's variables and mention what sort of values you're getting.
Sign In or Register to comment.