Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Gameduino 2 For Netduino

gameduino netduino spi

  • Please log in to reply
4 replies to this topic

#1 giawa

giawa

    New Member

  • Members
  • Pip
  • 4 posts

Posted 24 July 2015 - 04:33 AM

Hey everyone,

 

I've been hacking some more with my Netduino and have had some success with connecting to the Gameduino 2.  I'm not done porting yet, but I thought it might be useful and someone might have some fun with the examples I have completed.  Right now I have most of the basic examples up and running, including Hello World (text), Blobs (touch screen and shapes) and Simon (sound and touch targets).

 

https://github.com/g...eduino4netduino

 

I've attached two very unfortunate pictures below, but they sort of get the idea across.

 

Attached File  pic1.jpg   57.47KB   3 downloadsAttached File  pic2.jpg   35.49KB   2 downloads

 

In case you were wondering if it was possible, or even practical, the answer is yes!  Some special considerations have to be made for speed, but the Netduino does a pretty good job.  I'll be finishing up porting the library and all of the examples over the next week or so.

 

As a sneak peak, here's how simple it is to get started with the Gameduino 2 and your Netduino!

        public static void Main()
        {
            GD2.Init();

            GD2.ClearColorRGB(0x103000);
            GD2.Clear();
            GD2.DisplayText(240, 136, 31, GD2.Options.Center, "Hello, Netduino!");
            GD2.Swap();
        }

Cheers,

 

Giawa



#2 cSharper

cSharper

    Member

  • Members
  • PipPip
  • 13 posts
  • LocationOrlando, FL

Posted 24 July 2015 - 12:57 PM

Looks cool! Is that a touch screen to play the game?



#3 giawa

giawa

    New Member

  • Members
  • Pip
  • 4 posts

Posted 24 July 2015 - 03:08 PM

Yes, it's a resistive TFT touch screen and the 'GPU' is the FT800.  You can read more about the tech specs, etc here:  http://excamera.com/sphinx/gameduino2/

 

Gameduino 2 is a shield that adds a bright 4.3 inch touchscreen, an embedded GPU, headphone jack, accelerometer and microSD slot to your Arduino - or anything else with an SPI interface. Everything you need to create compelling games right in your hand.

  • video output is 480x272 pixels in 24-bit color
  • OpenGL-style command set
  • Up to 2000 sprites, any size
  • 256 Kbytes of video RAM
  • smooth sprite rotate and zoom with bilinear filtering
  • smooth circle and line drawing in hardware - 16x antialiased
  • JPEG loading in hardware
  • built-in rendering of gradients, text, dials and buttons

 

Cheers,

 

Giawa



#4 Mario Vernari

Mario Vernari

    Advanced Member

  • Members
  • PipPipPip
  • 1768 posts
  • LocationVenezia, Italia

Posted 31 July 2015 - 05:47 AM

Were you able to display images?

I stopped my porting because of that...


Biggest fault of Netduino? It runs by electricity.

#5 giawa

giawa

    New Member

  • Members
  • Pip
  • 4 posts

Posted 01 August 2015 - 09:36 PM

Were you able to display images?

I stopped my porting because of that...

 

Yes!  I'm just working on that this weekend and here is a screenshot (again, with my unfortunate phone camera).

 

Attached File  images.jpg   71.15KB   2 downloads Attached File  logo.jpg   81.99KB   1 downloads Attached File  eve.jpg   46.02KB   1 downloads

 

This is a bitmap image being loaded into memory and then text being laid on top.  I don't have a micro SD card around (just ordered one off Amazon), so I wrote a quick program on my computer that converts the images to a byte array to store in the actual Netduino program.  I'm holding off on committing that code to GitHub until I can actually do file loading.  However, I don't expect any major stumbling blocks.

            GD2.Init();
            GD2.Load(mono); // this is a byte array for now - make it a file when I have a micro SD

            // clear the screen
            GD2.ClearColorRGB(0x375e03);
            GD2.Clear();

            // draw the bitmap itself
            GD2.Begin(GD2.Primitive.Bitmaps);
            GD2.ColorRGB(0x68b203);
            GD2.BitmapSize(GD2.Filter.Nearest, GD2.Wrap.Repeat, GD2.Wrap.Repeat, 480, 272);
            GD2.Vertex2ii(0, 0);

            // now draw some text
            GD2.ColorRGB(0xffffff);
            GD2.DisplayText(240, 136, 31, GD2.Options.Center, "Images?  Check!");

            GD2.Swap();

Cheers,

 

Giawa

 

Edit:  Just got game Gameduino logo demo going.  Attached screenshot above.

Edit 2:  Just added JPEG decoding.  Got stuck on something *really silly* for a while >.<







Also tagged with one or more of these keywords: gameduino, netduino, spi

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.