Hello all,
I am new to the Arduino forums and I know that this product has been mentioned a lot in this forum but I am having some issues and maybe my use is a little different and may attract some help / use for someone else!
I purchased the Sparkfun 315 MHz receiver for use with my Mini Cooper key fob which also works on the 315 MHz band, I am able to wire up the receiver so that I can get a signal light to light up but I am not able to get signal into Serial Monitor. I would like to be able to see if I can find a specific ID for each button on the remote or at the very least find an ID between my two remotes so I could maybe turn my house lights on or off with my key fob when I get home.
Here is the code I have found around the web:
#include <VirtualWire.h>
void setup()
{
Serial.begin(9600); // Debugging only
Serial.println("setup");
//vw_set_ptt_inverted(true); // Required for DR3100
// Initialise the IO and ISR
vw_set_rx_pin(2);
vw_setup(2000);
vw_rx_start(); // Start the receiver PLL running
}
void loop()
{
//Serial.println("waiting....");
//vw_wait_rx();
uint8_t buf[VW_MAX_MESSAGE_LEN];
uint8_t buflen = VW_MAX_MESSAGE_LEN;
if (vw_have_message()) Serial.println("Have a message");
if (vw_get_message(buf, &buflen)) // Non-blocking
{
int i;
digitalWrite(13, true); // Flash a light to show received good message
// Message with a good checksum received, dump it.
Serial.print("Got: ");
for (i = 0; i < buflen; i++)
{
Serial.print(buf[i], HEX);
Serial.print(" ");
}
Serial.println("");
}
}
I have the data out of the receiver wired into Digital Input 2 on the Arduino (which I think is what the code says is the right input... right?) and I open up Serial Monitor, it prints "Setup" and thats it, nothing else. If I am doing something wrong just let me know, I would love to get this working and since I am able to see the LED light up from the "ASSI" output of the receiver I have faith that this project is very possible.
Thanks!
Barrowsn