Michael

Forum Replies Created

Viewing 15 posts - 811 through 825 (of 1,008 total)
  • Author
    Posts
  • in reply to: Redirecting output to crude display device #1050
    Michael
    Keymaster

    Where is the allocation of the shadowram array? How big is it? How much memory does your LED display code require? When using TVout, there’s very little memory left.

    in reply to: Is it possible? #1120
    Michael
    Keymaster

    laurent,

    I have written some custom firmware based on the requirements you had specified. It can be downloaded from
    http://nootropicdesign.com/defusableclock/downloads/DefusableClock3.zip

    I think this is very close to what you want. You can enable your “key” functionality by changing the key() function.

    Features:

    – There is no clock functionality. It is only a countdown timer.
    – The display shows the countdown value which can be adjusted by
    the HOUR and MIN buttons. If ALARM button is held, countdown
    can be decremented.
    – When DET button is pressed, countdown time is written to EEPROM
    to be used as default countdown duration when device is powered on.
    – If device is defused successfully, countdown freezes and top LED
    is lit.
    – If device detonates, countdown displays 00:00 and DET LED is lit.
    – HOUR or MIN button must be pressed to resume normal mode after
    countdown defuse or detonate. This is only possible if function
    key() returns true. This allows you to connect a key to an
    input pin and test it in key().
    – During the countdown, one wire is chosen to enable “fast
    countdown”. If this wire is cut, the countdown starts going twice
    as fast! This feature can be disabled by setting the variable
    useFastCountdownMode = false;

    • This reply was modified 8 years, 7 months ago by Michael.
    • This reply was modified 6 years, 9 months ago by Michael.
    in reply to: Redirecting output to crude display device #1119
    Michael
    Keymaster

    Hi Hamish,

    First, I think there is a bug in VideoFrameCapture.pde that might affect you, so try changing the line:

    EICRA = _BV(ISC11);

    to

    EICRA = _BV(ISC01);

    Other questions: how are you driving the LED displays? That is, what software or libraries are you using? Does it use any interrupts or timers? If it uses timer1, then there would be a conflict with the VE software since TVout uses timer1. Feel free to post your code, surrounded by “Code” tags.

    in reply to: motion tracking #955
    Michael
    Keymaster

    Regarding the chipKIT UNO32, nope, not a chance. The pin assignments on the UNO32 are all different. And the UNO32 is 3.3V, so you can’t use shields that have 5V CMOS chips.
    See http://nootropicdesign.com/projectlab/2011/11/01/chipkit-uno32-review/

    in reply to: motion tracking #953
    Michael
    Keymaster

    It would be challenging to do what you propose on an Arduino. There is only 2K of memory, and that’s why Arduino video is limited to very low resolution. Since you need two frame buffers to compare, you’d be at even lower resolution. No color info is available using the Video Experimenter.

    in reply to: Help a Newbie? #957
    Michael
    Keymaster

    moe, glad you had success. Agree with trodoss that function pointers are more of an advanced concept in C, so not really something that everyone understands. I’m glad there’s enough SRAM for both the Worms and Breakout games.

    A switch would be nice. When designing a product, it’s very important to keep costs down. Even a the cheapest of switches costs $.49 and the extra board space costs more, too. Most people don’t realize that for every $1 you add to the production cost, you add $2.77 to your retail price (so that there’s 40% margin for distributors and 40% margin for me). So being economical with the design is paramount. That’s why products are spartan in their design.

    in reply to: Help a Newbie? #1124
    Michael
    Keymaster

    No, loop() is not like main(). Function main() is called once when a program starts. Function loop() is called over and over again (by main()). Just remember that Arduino programs are just C/C++ programs with the main() hidden. You should study Arduino and C/C++ before going much further with game development.

    The code:

    game = &breakout;

    does not call the function breakout(). It makes the function pointer “game” point to the function “breakout”.

    What’s the difference between void and byte ?

    Byte is an 8-bit data type. void means “no type” or “does not return a value”. This is basic C stuff and I think you will need to learn more C, or you’ll really not get far. (sorry)

    in reply to: Help a Newbie? #1122
    Michael
    Keymaster

    Regarding your latest code post:

    void initBreakout() {
    loop();
    }

    don’t call loop() in your code (ever). loop() is automatically called over and over again in Arduino programs.

    You have a bug here where you use assignment (=) instead of comparison (==):

      if (choice = true){

    I think you’re not understanding the structure of Arduino programs in general. Your loop() method needs to call either worms() or breakout(), depending on which game was chosen. You need to move the breakout game logic out of loop() and into a function called breakout(). If breakout is chosen from the menu, set

    game = &breakout; 

    just like was done with game = &worms;

    Your loop() should invoke the function pointer “game” by calling it:

    void loop() {
    game();
    }

    Does this make sense? Just follow the pattern in the Hackvision.pde firmware.

    in reply to: Help a Newbie? #1121
    Michael
    Keymaster

    Moe,
    The structure of this code is not right. The function setup() is automatically called once when your Arduino program starts to run. The purpose of setup() is to initialize things. Do not call draw() from setup().

    Your function draw() is calling setup() (which in turn calls draw(), which calls setup())….see what’s happening here? This is infinite recursion which will blow the call stack very quickly.

    Your loop() function is what gets called over and over in Arduino programs. The general structure of an Arduino program is to have setup() for initialization, then loop() for continuous running of the code.

    So take draw() out of setup() and move it to loop(). And take setup() out of draw().

    Make sense?

    in reply to: Help a Newbie? #1133
    Michael
    Keymaster

    Moe,

    Glad you are trying to make your own game! Starting with the existing games is a good way to start. There are some simple ones on the games page:
    http://nootropicdesign.com/hackvision/games.html

    Why are you calling setup()? That is for initialization of the Arduino program and is only called when the program starts.

    Maybe you should post your whole program, and enclose in code formatting so it is easy to read. Use the button “Code” when you post…

    in reply to: Modified Firmware #1132
    Michael
    Keymaster

    Awesome, Phil. Thanks. I added your images to the gallery:

    http://nootropicdesign.com/defusableclock/gallery.html

    in reply to: Digit Display Problem #1131
    Michael
    Keymaster

    Thanks for investigating the problem in depth, and sorry you’re having problems. The boards are electrically tested, but the board house claims there can still be a fault rate of up to 2%, so we have encountered a few bad boards out of hundreds sold. You may have been unlucky.

    Have you tried reflowing the QB on the ‘595 and IC on the ‘247 pins? Maybe the solder mask is exposing part of the ground plane (bottom of board is ground plane) and there’s a tiny short. I’ve experienced some shorts like this and have fixed them by removing a bit of solder. If you can’t get it to work, I’ll replace the kit, of course. Just keep me posted.

    The pin assignments seem funny because on the ‘595 in A is the most significant bit, but on the ‘247, pin D is the most significant bit. So the connections are (ABCD) -> (DCBA).

    in reply to: Is it possible? #1306
    Michael
    Keymaster

    I can help, but not until January. Very busy for next 2 weeks…

    in reply to: Is it possible? #1304
    Michael
    Keymaster

    laurent,
    Yes, all of these things are possible with programming different firmware. It would not be too difficult, but would take time. Are you experienced as a programmer?

    in reply to: VCC-GND short #1302
    Michael
    Keymaster

    Below is an image that shows which pins are connected to VCC. These would be the ones to check for a short against the ground plane (which is the bottom of the board). Sometimes the solder mask gets burned away a bit, and a tiny amount of excess solder shorts against the ground pour.

Viewing 15 posts - 811 through 825 (of 1,008 total)