Im trying to make a remote timer circuit for controlling the power state of a Raspberry Pi. For this I'm using a attiny24. The idea is that an input (PA1) on the ATtiny is connected to a GPIO pin on the raspberry. When the GPIO pin is high then the Raspberry is powered on. When the pin goes low, then the Raspberry is off. When the pin goes low an internal timer in the ATtiny should start and after XX amount of seconds it sets another pin high (PB1). This then turnes the Raspberry on again. Kinda simple. So here is the question:
I want to be able to configure the timeout variable XX remotely, without having to flash the entire device again. But as a non expert in this, I'm trying to understand how this could work. As far as I understand I can use avrdude (from the raspberry pi) to write a variable to the EEPROM and then setup your AVR program to read from the EEPROM variable, is this right? If this is right, how would the variable be written with avrdude and how would it be read from the avr program?
Hope you can help.