(Dr. Nick Riveria voice) Hey Evelybody..... (/Dr. Nick Riveria voice)
So I am trying to connect a bluetooth HC-05 to a Digispark. I have tested and set up the HC-05 with an Uno, and wrote an Android app to connect to the bluetooth and then send a string to the bluetooth, which then printed out over the serial connection to my computer screen. What I am wanting to do with the Digispark is to receive this bluetooth string, and then DigiKeyboard.print() it. However I cannot get the code to compile. I know the HC-05 is working and I know my Digispark is working as I loaded the blink sketch to it and it's happy. Back to the code. I am looking all around and I think there is some kind of issue I am running into with the DigiKeyboard and the SoftSerial libraries but for the life of me cannot figure this out. Here is my code, and please forgive me as this is not even in a beta state yet. No comments and I have stripped out anything that didn't have anything to do with this simple pass of a string.
#include <TinyPinChange.h>
#include <SoftSerial.h>
#include "DigiKeyboard.h"
SoftSerial BTSerial(2, 3); // RX, TX
String blueString = "";
boolean blueSent = false;
void setup() {
BTSerial.begin(38400);
BTSerial.print("AT\r\n"); //Check Status
delay(500);
while (BTSerial.available()) {
//Serial.write(BTSerial.read());
}
}
void loop() {
delay(10);
DigiKeyboard.update();
while (BTSerial.available()) {
blueString = BTSerial.read();
}
if (blueString.length() > 0) {
//BTSerial.flush(); //Not sure if this will be needed or not.
DigiKeyboard.print(blueString);
blueString = "";
}
}
And now, here is the error I am getting compiling. I am including the warnings in case they actually are something I should pay attention to, but I think the meat of my issue is below that, but for the life of me, I can't figure out where __vector_2 is.
Arduino: 1.6.6 (Linux), Board: "Digispark (Default - 16.5mhz)"
Warning: platform.txt from core 'Digistump AVR Boards' contains deprecated recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} "{build.path}/{archive_file}" "{object_file}", automatically converted to recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} "{archive_file_path}" "{object_file}". Consider upgrading this core.
Warning: platform.txt from core 'Digistump AVR Boards' contains deprecated recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.flags} -mmcu={build.mcu} -o "{build.path}/{build.project_name}.elf" {object_files} "{build.path}/{archive_file}" "-L{build.path}" -lm, automatically converted to recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.flags} -mmcu={build.mcu} -o "{build.path}/{build.project_name}.elf" {object_files} "{archive_file_path}" "-L{build.path}" -lm. Consider upgrading this core.
WARNING: Category '' in library SPI is not valid. Setting to 'Uncategorized'
libraries/DigisparkTinyPinChange/TinyPinChange.cpp.o: In function `__vector_2':
/root/.arduino15/packages/digistump/hardware/avr/1.6.5/libraries/DigisparkTinyPinChange/TinyPinChange.cpp:57: multiple definition of `__vector_2'
libraries/DigisparkKeyboard/usbdrvasm.S.o:/root/.arduino15/packages/digistump/hardware/avr/1.6.5/libraries/DigisparkKeyboard/usbdrvasm165.inc:41: first defined here
collect2: error: ld returned 1 exit status
exit status 1
Error compiling.
This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.
If it would help if I post the verbose compile message, I will, but didn't want to chew up an entire screen on my very first post here. Thanks in advance for any help. I plan to post this all as a project when I get it running.
EDIT: So if I comment out the DigiKeyboard include and the corresponding lines, it will compile. Definitely a conflict here. And I have looked at line 57 of TinyPinChange.cpp, and line 41 of usbdrvasm165.inc and cannot see anything similar. I am lost at this point.