int sp=2;
int i,j;
int notes[]={262,294,329,349,392,440,493,523};
int delaytime1=300;
int delaytime2=50;
void setup()
{
for(i=0;i<8;i++)
{
tone(sp,notes[i],300);
delay(delaytime1);
noTone(sp);
delay(delaytime2);
}
}
void loop()
{
}
#include <iostream> #include <string.h> using namespace std; int main(int argc, char** argv) { for(int j=2;j<=100;j++)//j...
沒有留言:
張貼留言