Hi,
ich hab mir von Sparkfun dieses FM shield geholt :
https://www.sparkfun.com/products/10342?läuft auch auf meinem UNO ohne Probleme, aber nicht auf meinem Mega. Ich kann mir nicht erklären warum.
Ich hab in den skatch zwei Marken eingebaut um zu sehen wo es hängt. Die "Test1" ereicht er noch, die "Test2" nicht mehr.
Also muss ja der Fehler in der zeile
radio.begin(FM);
liegen.
Hat jemand ne Ahnung warum? Und warum nur beim MEGA?
//Add the Si4735 Library to the sketch.
#include <Si4735.h>
//Create an instance of the Si4735 named radio.
Si4735 radio;
void setup()
{
//Create a serial connection
Serial.begin(9600);
Serial.print("test1"); //**********************************erste Marke wird noch erreicht*********************
//Initialize the radio to the FM mode (Possible modes are AM, FM, SW, LW).
//The mode will set the proper bandwidth. Ensure that the antenna
//switch on the shield is configured for the desired mode.
radio.begin(FM);
Serial.print("test2");// *********************************zweite Marke nicht mehr *******************
//Set the FM Frequency to 97.3 MHz
radio.tuneFrequency(9650);
}
void loop()
{
//Wait until a character comes in on the Serial port.
if(Serial.available()>0){
//Decide what to do based on the character received.
switch(Serial.read()){
//If we get the number 8, turn the volume up.
case '8':radio.volumeUp();
break;
//If we get the number 2, turn the volume down.
case '2':radio.volumeDown();
break;
//If we get the number 4, seek down to the next channel in the current bandwidth (wrap to the top when the bottom is reached).
case '4':radio.seekDown();
break;
//If we get the number 6, seek up to the next channel in the current bandwidth (wrap to the bottom when the top is reached).
case '6':radio.seekUp();
break;
//If we get the letter m, mute the radio.
case 'M':
case 'm':radio.mute();
break;
//If we get the letter u, unmute the radio.
case 'U':
case 'u':radio.unmute();
break;
//If we get the letter s, print the current status of the radio.
case 'S':
case 's':Serial.print((unsigned char)radio.getStatus());
default:
break;
}
}
}