Hey guys,
not sure if this is the right place for this question, but it involves an example code so maybe it is.
for a project of mine, of i have an older arduino mega 1280 connected to a blue smirf gold from sparkfun: http://www.sparkfun.com/products/158
however, with the example code provided with arduino 1.0, i can’t get anything to show up in the bluetooth serial port(using putty for the bluetooth port)
does anybody have an idea as to why the bluetooth would be seemingly not working? I have the hardware connections exactly as they say in the sample code:
RX(bluesmirf)–>TX(pin 3)(arduino)
TX(bluesmirf)–>RX(pin 2)(arduino)
VCC(bluesmirf)–>3.3v arduino mega
ground–>ground
Code:
/*
Software serial multple serial test
Receives from the hardware serial, sends to software serial.
Receives from software serial, sends to hardware serial.
The circuit:
-
RX is digital pin 2 (connect to TX of other device)
-
TX is digital pin 3 (connect to RX of other device)
created back in the mists of time
modified 9 Apr 2012
by Tom Igoe
based on Mikal Hart’s example
This example code is in the public domain.
*/
#include <SoftwareSerial.h>
SoftwareSerial mySerial(2, 3); // RX, TX
void setup()
{
// Open serial communications and wait for port to open:
Serial.begin(57600);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
}
Serial.println(“Goodnight moon!”);
// set the data rate for the SoftwareSerial port
mySerial.begin(4800);
mySerial.println(“Hello, world?”);
}
void loop() // run over and over
{
if (mySerial.available())
Serial.write(mySerial.read());
if (Serial.available())
mySerial.write(Serial.read());
}