Which board in Arduino IDE

Store Forums Hackvision Game Development Which board in Arduino IDE

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #376
    jonathan
    Member

    Hi,

    Great little kit which I got for my twelve year old son at Christmas. He built it and it works great. Now for some coding (which I’ll need to help with). We downloaded what we think is the Arduino IDE referred to but we can’t actually work out how to connect to the board. The IDE also suggests choosing the ‘right’ board so that it gets certain parameters right when compiling. The Hackvision isn’t listed – so what board most closely resembles it? Also – we’re not entirely sure what we’re doing. Some kind of step by step tutorial would help and something which clearly explains the concepts behind what we’re trying to achieve. I guess there’s a piece of software on the board which allows communication via the USB with the IDE – this is the ‘bootloader’? When we write a ‘sketch’ does the IDE compile it then write the machine code to the board? Presumably there is only one ‘sketch’ loaded at once and writing a new ‘sketch’ will overwrite the two games already there? Is there a way to get back to the start (reload it as it came) if we re3ally mess up. Apologies for the rather elementary questions but whilst I used to do this sort of thing a long time ago it would be good to have a quick walk around what we’ve got here. Bit like a new car – where everything is. Thanks.

    #825
    Michael
    Keymaster

    @jonathan,
    Glad your son succesfully assembled it! The Hackvision is essentially an Arduino. I’ll add some clarifying comments to the game development page, but as for the explanations about the Arduino IDE, bootloader, and compiling/uploading sketches, that’s covered best on the Arduino site. Hackvision has a ATmega328 chip, so choose “Duemilanove or Nano w/ ATmega328” on the board menu. I will definitely clarify that.

    Do you have a USB-serial FTDI cable or adapter? That’s needed for uploading your own games.

    You’ve got the concepts right — the bootloader allows the IDE to communicate with the chip and upload firmware programs (“sketches”). It will hold one at a time, and yes you can always compile and upload the original Hackvision firmware. This firmware and required libraries are on the game development page in the section “Downloads”. For explanations about how/where to install libraries, see the Arduino libraries page.

    Writing games does assume some familiarity with Arduino and experience in C programming. I’d suggest loading the Tetris game onto your Hackvision as a first step. It is on the games page, and requires particular libraries which are downloadable there. Installing the libraries, compiling the Tetris game and uploading to your Hackvision will give you a good sense for the process. Then you could switch back to Space Invaders/Pong by downloading the Hackvision firmware and required libraries. Note that Tetris and Space Invaders/Pong require different versions of the TVout library.

    Good luck and have fun!

    #826
    jonathan
    Member

    Yes, have the USB-serial cable. Was expecting something to happen when I plugged it in though. Arduino website suggests Windows looks for a driver (I’m running windows 7). Nothing happens though. Thought I’d try serial monitor to see if I could see anything coming back but not sure of speed setting (tried various). Assumed I’d be able to communicate with the bootloader. On the plus side, had a look at the libraries link and created the directory, stored them etc. Thanks for the pointer. IDE sees the tv.out now. My C is rusty but creeping back…

    #827
    Michael
    Keymaster

    Hmm. Try following the manual instructions here: http://www.arduino.cc/en/Guide/Windows
    for the Duemilanove. Use “Add Hardware” to install the FTDI drivers that come with the Arduino IDE.
    I don’t have a modern Windows machine (I’m all Mac).

    #828
    jonathan
    Member

    Ok. Works fine! I think I worried too much. I didn’t want to upload anything and overwrite what was there before I knew what I was doing so I was looking for a way to test connectivity without causing any damage. However, throwing caution to the wind I took the hackvision code into the IDE having copied the tv and controller libraries into a folder as instructed, changed the text ‘space invaders’ to something else of the same length and then uploaded it. Worked like a dream and when I plugged it into the telly I saw my changed string – clearly all worked fine. So we’re now off to try something more adventurous… Thanks.

    #829
    Michael
    Keymaster

    That’s excellent — have fun!

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