OpenSprinkler Forums Hardware Questions Applying Opensprinkler to arduino Re: Re: Applying Opensprinkler to arduino



There are two places you need to change:
1. the call to ENC28J60::initialize takes csPin as a parameter, so find where that function is called and change that to your desired number.
2. inside ENC28J60::initialize function, notice there is a line where selectBit is calculated. This is hackish way to compute selectBit assuming the csPin is a PORB pin. The author of the library probably did this to speed up changing pin values, but you need to verify if this is valid with the csPin you selected. The simplest way is probably to find where selectBit appears, and just change them to use digitalWrite.