功能是用AM发射莫斯码 然后用收音机能听到。
void setup(){ DDRD=B00000100; //Set pin 2 to an } void loop(){ for(unsigned int x=0;x<500;x++) { for (unsigned int y=0; y<800;y++){ PORTD=0; PORTD=0; PORTD=0; PORTD=0; PORTD=0; PORTD=0; PORTD=0; PORTD=0; PORTD=0; PORTD=0; PORTD=0; PORTD=0; PORTD=4; } delay(1); } delay(1000); for(unsigned int z=0;z<200;z++){ for (unsigned int k=0; k<800;k++){ PORTD=0; PORTD=0; PORTD=0; PORTD=0; PORTD=0; PORTD=0; PORTD=0; PORTD=0; PORTD=0; PORTD=0; PORTD=0; PORTD=0; PORTD=4; } delay(2); } delay(1000); for(unsigned int f=0;f<200;f++){ for (unsigned int r=0; r<800;r++){ PORTD=0; PORTD=0; PORTD=0; PORTD=0; PORTD=0; PORTD=0; PORTD=0; PORTD=0; PORTD=0; PORTD=0; PORTD=0; PORTD=0; PORTD=4; } delay(1); } delay(1000); }
|