Transmitting to a nearby AM radio

I can successfully transmit tones to an AM radio nearby with this code:

void tone(int freq, int duration){
  if(freq == 0){delay(duration); return;}
  unsigned loops = (800000 / freq);
  long wait = (1000000 / freq);
  long v = (duration / ((wait*2)/1000));
  for(long k = 0;k < v;k++){
      for(unsigned i = 0;i < loops;i++){
      PORTD ^= 0x8;
    }
    delayMicroseconds(wait);
  }
}
void setup(){
    tone(440, 500); //Play A4 for 500ms
}
void loop(){}

The circuit is a 1K resistor from pin 3 to an antenna.
It works by actually turning the pin on and off over 800000 times per second.
Received frequency is between 880 and 890 khz.

Take a bow, you have invented the Arduino Marconi ;)

Now if I only knew how to read sheet music or how to send morse code.

smeezekitty: Now if I only knew how to read sheet music or how to send morse code.

Well I have to think that anyone that learns to program and read in C/C++ can learn to read sheet music, not that I've tried. And sending morse code is simple, it's learning to receive it, that's a bitch.

._ _ ._ .... _ _. _..

Lefty

retrolefty:

smeezekitty:
Now if I only knew how to read sheet music or how to send morse code.

Well I have to think that anyone that learns to program and read in C/C++ can learn to read sheet music, not that I’ve tried. And sending morse code is simple, it’s learning to receive it, that’s a bitch.

._ _ ._ _… _ . _…

Lefty

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1170901754

this is some useful work on AM morse code with radio

martin_bg: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1170901754

this is some useful work on AM morse code with radio

My code is better ;)

smeezekitty: Now if I only knew how to read sheet music or how to send morse code.

Follow the link in this thread: not only does he do Morse quite cleverly, but, with a name like "Kontrapunkte", he's gotta know something about music, too ;)

smeezekitty: It works by actually turning the pin on and off over 800 times per second. Received frequency is between 880 and 890 khz.

Shouldn't that be "800,000 times per second"?

I'm also wondering if this could possibly earn one a visit from the FCC, but I am not knowledgeable enough about RF to know whether this would cause any form interference or other issues that would have such consequences (not likely a power issue - though you could easily boost it if you wanted)...

Neat, all the same...

:)

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1169088394/0#0 This lets you get up to 4MHz! The code is also incredibly short, but fairly complex, unless you know lots about port manipulation and disabling interrupts. ]:D

Onions.

cr0sh:

smeezekitty:
It works by actually turning the pin on and off over 800 times per second.
Received frequency is between 880 and 890 khz.

Shouldn’t that be “800,000 times per second”?

Fixed.

I’m also wondering if this could possibly earn one a visit from the FCC, but I am not knowledgeable enough about RF to know whether this would cause any form interference or other issues that would have such consequences (not likely a power issue - though you could easily boost it if you wanted)…

Unlikely since the signal doesn’t leave the property. The PO is < 25mw.

I’m waiting for the first DX-contest :slight_smile: