Disabling Reset Pin

Hi, i am just wondering how to disable the reset pin on the attiny85 as i need to use it as a analog input without it resetting.

I am not bothered about reprogramming the chip after i have got my sketch on it and the reset pin is disabled

const int Gin = A0;   //Green sensor in
const int G = 4;     //Green LED out
int Gsensor = 0;      //Green sensor value
int Gvalue = 0;       //Green remapped value

const int Rin = A3;   //Red sensor in  
const int R = 0;     //Red LED out 
int Rsensor = 0;      //Red sensor value    
int Rvalue = 0;       //Red remapped value 

const int Bin = A1;   //Blue sensor in  
const int B = 1;     //Blue LED out
int Bsensor = 0;      //Blue sensor value
int Bvalue = 0;       //Blue remapped value

void setup() {
 pinMode(G, OUTPUT);
 pinMode(R, OUTPUT);
 pinMode(B, OUTPUT);
 
}

void loop() {

  Gsensor = analogRead(Gin);
  Gvalue = map(Gsensor, 0, 1023, 0, 255);
  analogWrite(G, Gvalue);

  Bsensor = analogRead(Bin);
  Bvalue = map(Bsensor, 0, 1023, 0, 255);
  analogWrite(B, Bvalue);

  Rsensor = analogRead(Rin);
  Rvalue = map(Rsensor, 0, 1023, 0, 255);
  analogWrite(R, Rvalue);

}

That is my code for the project as you can see i need to use all of the available I/O port for it to work unless there is another option

Here is the first, of many, pages the comes with a Google of "tiny 85 disable reset"

It seems that you need a high voltage programmer to program sketches once the reset is disabled. ICSP programming will no longer work.

I have tried to gogle it but was just wondering if there was anyway to upload the sketch and then disable the reset pin or if the high voltage programmer is needed no matter what

You could , I guess just use two leds instead of three and flash them for the third state, or do a two to four decoder on two outputs .
That frees up a digital
Pin ( not sure if you can then use it as an analog; but you could use it to switch two inputs).

Or get a bigger processor !

Charlieplexing

Instead of disabling the reset, you can use the part of the analog range that is above the voltage that will cause a reset (which is about 0.3 times Vcc.) Do this with a voltage divider, so that the minimum voltage you try to read is above the reset limit:

Here is what I have used in a windows command tool to disable the reset pin of an ATtiny85. You'll have to adapt it for your environment. The pin can then be used as analog ADC0.
To undo it all and make the chip programmable again, use a high voltage programmer (as already said).
I once, incidentally, built a special programmer including a high voltage programmer, so I could rapidly go through a development cycle including restoring the fuses to factory, reloading a sketch, disabling reset and testing. However, I came to the conclusion that it is not worth the effort of saving one pin unless you are designing a mass market product with a large production run. It is simply better to use a chip with more pins eg ATtiny 84 (which, incidentally, has a better ADC that the ATtiny85)

// navigate to avrdude directory
cd "C:\Program Files (x86)\Arduino\hardware\tools\avr\bin"

// view the current fuse settings
.\avrdude -C "C:\Program Files (x86)\Arduino\hardware\tools\avr\etc\avrdude.conf" -c avrisp -p t85 -P COM7 -b 19200 -v

// RSTDISBL !!  disable reset
.\avrdude -C "C:\Program Files (x86)\Arduino\hardware\tools\avr\etc\avrdude.conf" -c avrisp -p t85 -P COM7 -b 19200 -v -U hfuse:w:0x57:m