First Gamby Demo video

posted 31 May 2013, 01:23 by JO3RI Read Grab Share

Finished soldering the Gamby Retro Gaming shield I told you about in an other post. Well actually I finished it 2 weeks ago, which gave me some time, trying several things on it. I managed to make a small demo, using bitmaps AND animations. I haven't used frame based animations, that I'll have to try some other time. In this demo I use real-time sine calculation. As you can see the Arduino and the shield are at the tip of there possibilities, but they manage. This, for example, is the part for the rotating DNA.
    float d = 0.0;
    while (1){
        float q = 2*sin(-d);
        for (byte k = 1; k<12;k++){
          float r = sin(d+(k*0.4));
          float t = sin(d+3+(k*0.4));
          gamby.disc(k*8+p,12+(r*10),2);                         // the topside discs
          gamby.disc(k*8+q,12+(t*10),2);                         // the downside discs
          gamby.line(k*8+p,10+(r*10),k*8+q,(10+t*10));     // vertical lines