objectTracking

Store Forums Video Experimenter Bugs/Problems objectTracking

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #437
    benny
    Member

    Hi,

    I’ve build the videoExperimenter and loaded the objectTracking code, it worked at the first attempt!!

    Unfortunately I’ve noticed a strange thing, after about 15- 20 seconds, the surrounding box disappears and the only thing I can do is a reset where it works again for about the same time.

    Any hints ?

    PS The only thing I changed in the code was the format, in Europe we use mainly PAL.

    #948
    benny
    Member

    I did some more testing:

    It lookslike it always hangs after calling tv.resume(); in the mainloop of objectTracking.

    I looked into the code but cannot figure out how it works, anyone a bright idea ?

    -ben

    #952
    Michael
    Keymaster

    Benny, I’m not sure why you are experiencing this issue. I have not experienced that. Sometimes the LM1881 chip seems to lose the sync, and I’ve restored it by flipping the overlay switch. You might try adjusting the small potentiometer R4 slightly to see if you get better stability.

    I’m almost sure this is not a code problem, but an issue with the LM1881 losing track of the sync from the composite input.

    #865
    benny
    Member

    Hi Michael,

    Thanks for the reply, I will check the LM1881 to see if it losses sync.
    I’ve put in some debug statements and it ALWAYS hangs when calling tv.resume().

    Serial.print(“2”);
    tv.resume();
    Serial.print(“3”);

    If it hangs (I thought it was after 15-20 seconds but sometimes it is much more or much less), it prints 2 at the serial output and never 3 ….

    I’ll keep you posted.

    -ben

    #866
    Michael
    Keymaster

    Ok, here’s a question for you: have you been trying to use the Serial interface in your program (before using it for debugging)? Serial communication won’t work well with TVout because it is interrupt driven. So, the absence of the “3” may not mean that the program is hung (although your use of interrupt driven serial communication may cause it to hang).

    TVout comes with a polling version of serial communication in the “pollserial” library. There is an example called NTSCserialTerm.pde. Basically, declare an object like this:

    pollserial pserial;

    and then use it just like Serial:

    pserial.print("3");

    Question 2: When the bounding box disappears, do the coordinates written in the upper left of the screen also stop displaying?

    It’s hard to imagine tv.resume() freezing because it just sets a variable. What hardware are you running on (ATmega328?) and what resolution are you using?

    #1309
    chuckcrunch
    Member

    im have the same problem board losing sync and i can’t use servos, interrupts i gess?. is there a work around?

    #1310
    Michael
    Keymaster

    Correct, if you are using interrupts, that will definitely interfere with the timing of the video generation which depends on timer interrupts.

    #1143
    twerff
    Member

    Hi there,

    I have exactly the same problem. I did not know about the problems in combination with the Serial, but I did find an odd thing happening. When I run the program with Serial Monitor it works fine, but at a certain point the output of the board to the TV is only black. Also the Serial printing stops. When I close and open the Serial Monitor the Arduino seems to reset itself and it works fine again.
    Fiddling with the R4 doesn’t change a thing unfortunately.

    Kind regards,
    Thomas

    #1144
    Michael
    Keymaster

    If you are using the ordinary Serial library, then yes, you are going to have problems like that. You need to use the polling serial provided by the TVout library.

    #1145
    twerff
    Member

    I read that. But without the Serial printing I have the same problem.

    #1293
    benny
    Member

    Hi,

    I restarted my object tracking project, trying to solve this ‘hanging’ issue.
    Unfortunately I cannot find the source of the problem, I removed the serial debugging statements to make sure this was not interfering with the rest of the code.
    Sometimes the code runs for more then 20 minutes, next time it seems to hang after 15 seconds, it is certainly not repeatable but VERY random.
    I adjusted R1 but this did not make any difference, as far as I can debug the code, it seems to hang in the tv.capture routine.
    If syncselect0 has been toggled, the system works again, do not know if it was restarted or continued from the place where it ‘hung’.

    If there is anyone who can help, this would be great!

Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.