Is there any way to use DigiUSB and SoftwareSerial at the same time? (They seem to use the same interrupts)
DigisparkUSB/usbdrvasm.S.o: In function `__vector_2':
(.text+0x58): multiple definition of `__vector_2'
SoftwareSerial/SoftwareSerial.cpp.o:/Users/myersbrandon/Applications/DigiSpark.app/Contents/Resources/Java/libraries/SoftwareSerial/SoftwareSerial.cpp:329: first defined here
This is the modified blinkLED from RadioBlock examples
#include <TinyWireM.h> // I2C Master lib for ATTinys which use USI - comment this out to use with standard arduinos
#include <LiquidCrystal_I2C.h> // for LCD w/ GPIO MODIFIED for the ATtiny85
#include <DigiUSB.h>
#include <SoftwareSerial.h>
#include <RadioBlock.h>
#define GPIO_ADDR 0x27 // (PCA8574A A0-A2 @5V) typ. A0-A3 Gnd 0x20 / 0x38 for A - 0x27 is the address of the Digispark LCD modules.
int currentLine = 0;
boolean clearOnNext = 0;
boolean backlight = 1;
LiquidCrystal_I2C lcd(GPIO_ADDR,16,2); // set address & 16 chars / 2 lines
//Pins connected to RadioBlock pins 1/2/3/4
RadioBlockSerialInterface interface = RadioBlockSerialInterface(-1,-1,1,5);
uint8_t payload[] = {2};
void setup()
{
DigiUSB.begin();
TinyWireM.begin(); // initialize I2C lib - comment this out to use with standard arduinos
lcd.init(); // initialize the lcd
lcd.backlight(); // Print a message to the LCD.
lcd.setCursor(0, currentLine);
interface.begin();
DigiUSB.println("Starting...");
}
void loop() // run over and over
{
interface.setLED(true);
delay(500);
interface.setLED(false);
delay(1500);
interface.toggleLED();
if (interface.readPacket(1000)) {
if (interface.getResponse().getErrorCode() == APP_STATUS_SUCESS){
DigiUSB.println("Party");
} else {
DigiUSB.println("I failed");
}
DigiUSB.print("Len: ");
DigiUSB.print(interface.getResponse().getPacketLength(), DEC);
DigiUSB.print(", Command: ");
DigiUSB.print(interface.getResponse().getCommandId(), HEX);
DigiUSB.print(", CRC: ");
DigiUSB.print(interface.getResponse().getCrc(), HEX);
DigiUSB.println("");
}
}