Forum Replies Created
-
AuthorPosts
-
MichaelKeymaster
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
MichaelKeymasterI don’t think you can. It only draws lines of width 1 pixel.
MichaelKeymasterWhat 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.
MichaelKeymasterYes, 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.
MichaelKeymasterStrange. 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.MichaelKeymasterThis 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?
MichaelKeymasterOk, 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);
}MichaelKeymasterThe 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.
MichaelKeymasterCan 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.
MichaelKeymasterTry 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.
MichaelKeymasterThere 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]MichaelKeymasterOk, 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/LiquidCrystalMichaelKeymasterYes, it uses pins 5-13 as the product documentation states:
http://nootropicdesign.com/audiohacker/MichaelKeymasterDid 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.MichaelKeymasterIf 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.
-
AuthorPosts