Getting Started

(lily) #1

Chapter 8: C Pointers and Arrays


/__flash char TEXT_SONG2[] = "Turkey march";
EM = "Turkey march";

1, 16,e1, 4,g1, 16,a1, 16,g1, 16,xf1,
16,b1, 16,xa1, 16,b1, 16,xf2, 16,e2,
,xf2, 16,e2, 16,xd2, 16,e2, 4,g2, 8,e2,
2, 16,xf2, 8,e2, 8,d2, 8,e2, 32,d2, 32,e2,
d2, 8,e2, 32,d2, 32,e2, 16,xf2, 8,e2, 8,d2,

ommented out by ATMEL - see their readme
ts all the songs ;-)
ROGMEM = "Minuet";
GMEM =

,d2, 8,c2,
xf1, 8,g1,
1, 2,a1,

};


MEM = "Auld Lang Syne";

=

, 8,c3, 4,c3, 4,e3, 2,d3, 8,c3, 4,d3, 8,e3, 8,d3,
, 4,e3, 4,g3, 2,a3, 8,p, 4,a3, 2,g3, 8,e3, 4,e3,
2,d3, 8,c3, 4,d3, 8,e3, 8,d3, 2,c3, 8,a2, 4,a2, 4,g2,
4,p,
0, 1
;

0, 1
};


/
const char TEXT_SONG2[] PROGM


//__flash int Mozart[] =
const int Mozart[] PROGMEM =
{
3,
16,xf1, 16,e1, 16,xd
16,g1,4,b1, 16,c2,
16,xd2, 16,e2, 16
8,g2, 32,d2, 32,e
16,xf2, 8,e2, 8,
8,xc2, 4,b1, 0, 1
};


// mt song 3 & 4 where c
// well, the gcc-geek wan
const char TEXT_SONG3[] P


const int Minuet[] PRO
{
2,
4,d2, 8,g1, 8,a1, 8,b1, 8,c2, 4,d2, 4,g1, 4,g1, 4,e2, 8,c2,
8,d2, 8,e2, 8,xf2, 4,g2, 4,g1, 4,g1, 4,c2, 8
8,b1, 8,a1, 4,b1, 8,c2, 8,b1, 8,a1, 8,g1, 4,
8,a1, 8,b1, 8,g1, 4,b
0, 1


char TEXT_SONG4[] PROG


const int AuldLangSyne[] PROGMEM
{
3,
4,g2, 2,c3
2,c3, 8,c3
4,c3,
2,c3,


}

Free download pdf