I have the Ultimate 2.0 and am trying to make a Bluetooth connection with the arduino IDE. I have found what seems to be the code as follows. My IO geer USB Bluetooth dongle uses a Broadcom chip set. I, as of yet, have not been able to make this connecton.
Can anyone help?
#include <Arduino.h>
#include <MeMegaPi.h>
#include "MeEEPROM.h"
#include <Wire.h>
#include <SoftwareSerial.h>
void setup() {
Serial.begin(115200);
//Serial0.begin(115200);
Serial1.begin(115200);
Serial2.begin(115200);
Serial3.begin(115200);
//Serial4.begin(115200);
Serial.println("Program Bluetooth test");
}
void loop() {
// Write back data received from Bluetooth to Serial monitor
if ( Serial.available() ) {
Serial.print ("Serial available: ");
Serial.write( Serial.read() );
Serial.println();
}
if (Serial1.available()) {
Serial.write(Serial1.read());
Serial.println("Serial1 available");
}
if (Serial2.available()) {
Serial.write(Serial2.read());
Serial.println("Serial2 available");
}
if (Serial3.available()) {
Serial.write(Serial3.read());
Serial.println("Serial3 available");
}
// Send to Bluetooth data received from Serial monitor
if (Serial.available()) {
Serial3.write(Serial.read());
}
}