Michael

Forum Replies Created

Viewing 15 posts - 391 through 405 (of 1,008 total)
  • Author
    Posts
  • in reply to: A little Programming Help #2072
    Michael
    Keymaster

    It’s very easy to set the LED high or low.

    digitalWrite(LED_TOP, HIGH);
    delay(2000); // wait 2 seconds
    digitalWrite(LED_TOP, LOW);

    The function countdown() is where the countdown is implemented, and detonate() is where the detonation sequence happens. You’ll need to stop using the 2 LEDs you repurpose everywhere else in the code, like the detonation sequence blinking.

    These code changes are not hard, but if you are not a programmer, then it may be more than you want to figure out. You could consider buying the Custom Programming option in the store, and I could code up the solution for you. Please understand I don’t have time to do everyone’s projects for free, so I have to charge some money for my time.

    http://nootropicdesign.com/store/index.php?main_page=product_info&cPath=5&products_id=33

    in reply to: tv.drawline() line width #2070
    Michael
    Keymaster

    I don’t think you can. It only draws lines of width 1 pixel.

    in reply to: SpaceInvaders #2069
    Michael
    Keymaster

    What version of the Arduino IDE are you using. I’ve seen those problems with the 1.5.x beta. You should use 1.0.x.

    in reply to: Anyone planing to upgrade this sheild? #2066
    Michael
    Keymaster

    Yes, that is a great idea and in fact I have designed a V2 of the board which is being made right now. It has a 20K resistor to create a divider on A2, so the pot range is expanded.

    in reply to: Counting frames in a video source #2063
    Michael
    Keymaster

    Strange. Maybe the ISR fires many times at the beginning of each frame for some reason.
    I’d put the frame increment in your vbi_hook function. (or at the same place in TVout.cpp where the vbi_hook function is called). That definitely should get called once per frame in the vertical blanking interval.

    in reply to: Counting frames in a video source #2061
    Michael
    Keymaster

    This ISR should be called once per frame. You should see it go up by 60 every second. The variable scanLine is which line of the frame it’s on, so when it’s time to start the next frame, we reset the line to 0.

    Is it increasing at a rate higher than 60 frames per second?

    in reply to: Counting frames in a video source #2059
    Michael
    Keymaster

    Ok, I may have told you the wrong ISR to increment the frame count. Try doing it in

    ISR(INT0_vect) {
    display.scanLine = 0;
    frameCount++;
    }

    This function should be in your sketch, so you should not have to change TVout.cpp at all. Your sketch can declare

    volatile unsigned long frameCount = 0;

    And loop() can use it directly. Note the format for an unsigned long is “%lu” (I think)

    void loop() {
    sprintf(s, "Frames: %lu", frameCount);
    tv.print(0, 0, s);
    }
    in reply to: Can the VE read number plates? #2055
    Michael
    Keymaster

    The edge detection demo (in which the edges of an ‘A’ are detected) does not identify the letter as an A. It just finds the outline. Finding the edges of an image is not the same as identifying the image.

    The ATmega328 microcontroller is not nearly powerful enough to perform computer vision tasks like shape recognition.

    in reply to: Counting frames in a video source #2054
    Michael
    Keymaster

    Can you show us your code in the main loop()? Are you refreshing the display of frameCount over and over? You need to keep drawing it to keep the display updated.

    in reply to: SYNC problem #2050
    Michael
    Keymaster

    Try using TV.delay(100) instead of delay(100). You might also try TV.delay_frame(6) which delays 6 frames which is 1/10 of a second.

    in reply to: Counting frames in a video source #2049
    Michael
    Keymaster

    There is a function pointer called vbi_hook that runs every time a frame ends (in the vertical blanking interval). You can define a function for the vbi_hook and increment a counter in it. If you want to access the counter value from outside an interrupt service routine (e.g. to display it), make sure you declare your counter variable as volatile.

    Or you can increment your counter in the ISR that runs every time a new frame starts: [tt:3j0g3aqq]ISR(TIMER1_OVF_vect)[/tt:3j0g3aqq]
    All this code is in [tt:3j0g3aqq]video_gen.cpp[/tt:3j0g3aqq]

    in reply to: Audio Delay line #2047
    Michael
    Keymaster

    Ok, sounds like you have your delay working.

    I haven’t ever interfaced with an LCD and don’t have one, so I can’t comment on how well it would work. I think it would work, but you need lots of pins. The Audio Hacker uses pins 5-13, so you have pins 2,3,4 and the analog pins A0-A5 which can be used as digital pins if you refer to them as 14-19. Have a look at this:
    http://arduino.cc/en/Tutorial/LiquidCrystal

    in reply to: What pins are available? #2045
    Michael
    Keymaster

    Yes, it uses pins 5-13 as the product documentation states:
    http://nootropicdesign.com/audiohacker/

    in reply to: Space Invaders #2042
    Michael
    Keymaster

    Did you install the required libraries correctly? The process is described here: http://nootropicdesign.com/hackvision/games.html. If you are using the original Hackvision.pde game, then you need the older TVout library downloadable from nootropicdesign.com.

    If you downloaded the standalone SpaceInvaders.ino sketch, then that uses the TVout from Google Code. The instructions say this:

    NOTE: This original firmware no longer works with the newer versions of Arduino and the Uno bootloader.
    You can use the standalone Space Invaders and Pong games. These are to be used with the TVout library at Google Code and the Hackvision Controllers library.

    in reply to: limit the recognized area. #2041
    Michael
    Keymaster

    If you have headers with long pins, you can place them on the outside set of pads so that the shield is “stackable”. When this product was designed, it was hard to get the long-pin headers. What other shield do you want to stack with the Video Experimenter? The VE is not going to be compatible to stack with most shields since the VE uses so many pins. You can always put the VE on top if you are going to stack it with a compatible shield.

Viewing 15 posts - 391 through 405 (of 1,008 total)