Shop OBEX P1 Docs P2 Docs Learn Events
Gripper and IR - Page 2 — Parallax Forums

Gripper and IR

2»

Comments

  • FranklinFranklin Posts: 4,747
    edited 2010-05-12 16:50
    CJW you are getting assistance but you are not listening to it or following the advice given. The first thing you need to do is sit down and write out the steps IN DETAIL of what you want the bot to do.

    In your video it looks like it does turn around, it does find an object within its field of view and it does move toward it. You then force it to grab something it was not after and it then continues to do the code over again. Take each state and make sure it does EXACTLY what you want by using a flowchart or just writing down what will happen as each choice is made in the code.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • CJWCJW Posts: 77
    edited 2010-05-13 13:28
    Hi,

    I would like to know why in the starting the bot will pause for a while this is the attachment and the link


    Yours Sincerely
    James
  • FranklinFranklin Posts: 4,747
    edited 2010-05-13 15:19
    FREQOUT 4, 2000, 3000
    

    Three second delay

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • CJWCJW Posts: 77
    edited 2010-05-13 15:33
    Hi,

    So what should I do?
  • Mike GreenMike Green Posts: 23,101
    edited 2010-05-13 16:04
    1) Read the Manual so you understand what Franklin said and what your program does. There's a chapter in the Stamp Basic Syntax and Reference Manual on the FREQOUT statement.

    2) Decide what you want your bot to do and change the statement so it does what you want.
  • CJWCJW Posts: 77
    edited 2010-05-13 16:06
    Thank you. I will take a look.
  • CJWCJW Posts: 77
    edited 2010-05-14 05:09
    Hi,

    Sorry, I look at the book, I saw Programming the Start/Reset Indicator. They wrote:

    The next example program tests the piezospeaker. It uses the FREQOUT command to send
    precisely timed high/low signals to a speaker. Here is the FREQOUT command’s syntax:

    FREQOUT Pin, Duration, Freq1 {,Freq2}
    Here’s an example of a FREQOUT command that’s used in the next example program.
    FREQOUT 4, 2000, 3000
    The Pin argument is 4, meaning that the high/low signals will be sent to I/O pin P4. The
    Duration argument, which is how long the high/low signals will last, is 2000, which is
    2000 ms or 2 seconds. The Freq1 argument is the frequency of the high/low signals. In
    this example, the high/low signals will make a 3000 hertz, or 3 kHz, tone.
    Frequency can be measured in hertz (Hz). The hertz is a frequency measurement of how
    many times per second something happens. One hertz is simply one time-per-second, and
    it’s abbreviated 1 Hz. One kilohertz is one-thousand-times-per-second, and it’s abbreviated
    1 kHz.
    FREQOUT digitally synthesizes tones. The FREQOUT command applies high/low pulses
    of varying durations that make a piezospeaker’s vibration more closely resemble natural
    vibrations of music strings.
  • Mike GreenMike Green Posts: 23,101
    edited 2010-05-14 05:26
    Although that description of the FREQOUT statement is correct, it's not the manual I suggested. Your message says nothing about what you understand (or don't understand) or how you would apply that information to what you want to accomplish.
  • CJWCJW Posts: 77
    edited 2010-05-16 15:36
    Hi,

    I would like to inform you that my boe bot able to grab and turn back then the bot will turn right 1 round and drop the item. Can I know whether only turn 90 degree can a not?

    Yours Sincerely
    James
  • FranklinFranklin Posts: 4,747
    edited 2010-05-16 19:23
    CJW said...
    Can I know whether only turn 90 degree can a not?
    Yes, you can program it to do that. If 360 takes so many loops 90 will take 1/4 of that.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • CJWCJW Posts: 77
    edited 2010-05-17 00:58
    Hi,

    Can I know where to change?

    James
  • ercoerco Posts: 20,256
    edited 2010-05-17 01:21
    Yes, you can! It's really quite easy and fun if you follow all of the excellent suggestions here. You are getting very good help from some of the best people here.

    They want to teach you to fish, rather than give you a fish.

    Suddenly I'm hungry for a Filet O' Fish...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·"If you build it, they will come."
  • CJWCJW Posts: 77
    edited 2010-05-17 01:41
    Hi,

    But i don't get it. As I don't know where to change. Is It change at pulseRight or pulseLeft

    -James
Sign In or Register to comment.