'class SoftSerial' has no member named 'readString' ! Arduino DigiSpark attiny85

’class SoftSerial’ has no member named ‘readString’ ! Arduino DigiSpark attiny85 SoftSerial.h SoftwareSerial.h NeoPixel

i’m using Arduino IDE 1.8.12, it’s setup to use digispark libs (i think), don’t remember exactly what i did, watched a video online some many moths ago.

i have an issue with my sketch, when i try to compile it it gives me this error:

error: ‘class SoftSerial’ has no member named ‘readString’

dataIn = bluetooth.readString();

exit status 1
‘class SoftSerial’ has no member named ‘readString’

I am not that surprised because the original code was written for an Arduino and it used SoftwareSerial.h instead of SoftSerial.h but for some strange reason i can’t load or get to work with softwareserial now, i have the libs in arduino folder but i don’t know if it’s even possible to load them and work with them since i’ve set the IDE to work with digispark.

The other solution would be to find a way to do “readString” in a way that SoftSerial recognises, i’m not sure if that is possible either.


#include <Adafruit_NeoPixel.h> // NeoPixel Lib
#include <SoftSerial.h>  // Serial Lib

#define LED_PIN    1
#define LED_COUNT 30

SoftSerial bluetooth(3, 4); // RX TX
Adafruit_NeoPixel strip(LED_COUNT, LED_PIN, NEO_GRB + NEO_KHZ800);

int brightness = 100;   //
int redColor = 0;
int greenColor = 0;
int blueColor = 0;

String dataIn = "";   //

unsigned long timer1 = 0;

void setup()
  bluetooth.begin (9600);
  strip.begin();           // INITIALIZE NeoPixel strip object (REQUIRED)
  strip.show();            // Turn OFF all pixels ASAP
  strip.setBrightness(brightness); // Set BRIGHTNESS to about 1/5 (max = 255)


void loop(){
  if (bluetooth.available() > 0);{
    dataIn = bluetooth.readString();
//    Serial.println(dataIn);
    if (dataIn.startsWith("1")){
      String R = dataIn.substring(dataIn.indexOf("R") + 1, dataIn.indexOf("G"));
      redColor = R.toInt();
      String G = dataIn.substring(dataIn.indexOf("G") + 1, dataIn.indexOf("B"));
      greenColor = G.toInt();
      String B = dataIn.substring(dataIn.indexOf("B") +1, dataIn.indexOf("E"));
      blueColor = B.toInt();

    else if (dataIn.startsWith("2")){
      String stringBrightness = dataIn.substring(dataIn.indexOf("2") + 1, dataIn.length());
      brightness = stringBrightness.toInt();

    for (int i = 0; i < LED_COUNT; i++){
      strip.setPixelColor(i, strip.Color(greenColor, redColor, blueColor));