Attiny84 and Arduino

I am using my Arduino Uno board as an ISP to program an Attiny84. The sketch I have is

//pins for the LEDs:

const int redPin = 3;

const int greenPin = 5;

const int bluePin = 6;




const int redPin2 = 9;

const int greenPin2 = 10;

const int bluePin2 = 11;




#define REDPIN 3

#define GREENPIN 5

#define BLUEPIN 6




#define FADESPEED 5 




void setup() {

// initialize serial:

Serial.begin(9600);




// make the pins outputs:

pinMode(redPin, OUTPUT); 

pinMode(greenPin, OUTPUT); 

pinMode(bluePin, OUTPUT); 




pinMode(redPin2, OUTPUT); 

pinMode(greenPin2, OUTPUT); 

pinMode(bluePin2, OUTPUT); 




Serial.print("Arduino control RGB LEDs Connected OK ( Sent From Arduinno Board )");

Serial.print('\n');

}




void loop() {




// if there's any serial available, read it:

while (Serial.available() > 0) {

  

 // look for the next valid integer in the incoming serial stream:

 int red = Serial.parseInt(); 

 // do it again:

 int green = Serial.parseInt(); 

 // do it again:

 int blue = Serial.parseInt(); 




 int red2 = Serial.parseInt(); 

 // do it again:

 int green2 = Serial.parseInt(); 

 // do it again:

 int blue2 = Serial.parseInt(); 




 // look for the newline. That's the end of your

 // sentence:

 if (Serial.read() == '\n') {

            

   // constrain the values to 0 - 255 and invert

   // if you're using a common-cathode LED, just use "constrain(color, 0, 255);"

   

   //red = 255 - constrain(red, 0, 255);

   //green = 255 - constrain(green, 0, 255);

   //blue = 255 - constrain(blue, 0, 255);

   

 red = constrain(red, 0, 255);

 green = constrain(green, 0, 255);

 blue = constrain(blue, 0, 255);

   

 red2 = constrain(red2, 0, 255);

 green2 = constrain(green2, 0, 255);

 blue2 = constrain(blue2, 0, 255);




   // fade the red, green, and blue legs of the LED: 

 analogWrite(redPin, red);

 analogWrite(greenPin, green);

 analogWrite(bluePin, blue);

   

 analogWrite(redPin2, red2);

 analogWrite(greenPin2, green2);

 analogWrite(bluePin2, blue2);




   // print the three numbers in one string as hexadecimal:

Serial.print("Data Response : ");

 Serial.print(red, HEX);

 Serial.print(green, HEX);

 Serial.println(blue, HEX);

 }

}




}

Now this verifies and uploads to my Arduino board no problem. When I try to switch the board to Attiny84 @ 8MHz and then I go to verify the sketch I get this error:

ANdroid.ino: In function 'void loop()':
ANdroid:86: error: 'class TinyDebugSerial' has no member named 'parseInt'
ANdroid:90: error: 'class TinyDebugSerial' has no member named 'parseInt'
ANdroid:94: error: 'class TinyDebugSerial' has no member named 'parseInt'
ANdroid:99: error: 'class TinyDebugSerial' has no member named 'parseInt'
ANdroid:103: error: 'class TinyDebugSerial' has no member named 'parseInt'
ANdroid:107: error: 'class TinyDebugSerial' has no member named 'parseInt'

Does anyone know why I am getting this error? More so how can I fix it? I want to run the above mentioned sketch on an attiny84 as not to carry around the arduino board with me for this project. What are my options? Thanks for input.

TinyDebugSerial (Serial on the Tiny Core) does not include a parseInt method.

The bigger issue is that TinyDebugSerial does not support receiving.

There are rumors that NewSoftSerial works on ATtiny processors.

Thanks for the reply. Any idea how I would rewrite the sketch to work with the attiny84 then?

Download NewSoftSerial. Install NewSoftSerial. Replace Serial with an instance of NewSoftSerial. Test.

I already have it I think. I have Arduino 1.0.5 and it says do not download if I have 1.0 or later as it comes with it. What would the code be instead of "Serial?"

What is the difference with the stock SoftwareSerial ?
I've been using this one yesterday to debug code on ATTiny85

Regards

nbenm:
What is the difference with the stock SoftwareSerial ?

At this point in time, not much.

@FallenDemon, try SoftwareSerial.