Hope this is the right section for this query.
I wanted to ask something about how to send diffirent variables to a attiny controller.
Like for example if I want to control ? row of LEDS numbered trough 1 - 5 connected to a Attiny. How can I turn them on by using a number 1 - 5 which would be sended to the Attiny from the Arduino to control the LEDS individually. I would find this helpful because instead of connecting all 5 leds to the Arduino you could use just one pin to control the Attiny that would take care of the five LEDS. So the arduino would have 4 free pins!!
I would like to use this technique for my 4x4x4 LED project cube that I want to start soon!
If possible please show me some sample code, THANK YOU!!
What I ought to mention as nobody has picked up on it yet, the ATtiny85 doesn't have enough I/O pins to do what you want. It only have 5 pins which means you could only have 3 LEDs if you used 2 pins for communication.
It is possible to disable the Reset pin and gain an extra I/O pin which would allow you to have 4 LEDs, however this requires either a High voltage programmer or a bootloader (The latter of which takes up 576bytes of flash).
You could use a serial connection between Arduino and the Tiny: Arduino TX -> Tiny RX, Gnd->Gnd.
This will leave you with 4 pins free on the Tiny.
On the Tiny you use SoftwareSerial to receive the communication from Arduino