Cooperative communication uses spatial diversity to mitigate multipath fading. With an appropriate assignment of partners it also decreases the energy expenditure of the network. Together with optimum transmit power allocation, it is a useful technique to overcome the energy constraint problem in wireless sensor nodes. The calculation of optimum power in a Rician fading channel is a computationally complex process especially for nodes with limited resources. Approximate techniques like using the concept of coding gain yields a simple expression but the conditions for which the approximation is valid limit its use in many practical scenarios. Using a piecewise linear approximation for the power gain of the Rician channel, we propose a computationally simple method to calculate transmit power for amplify-and-forward relay links. The scheme is then used in an IEEE 802.15.4 compatible wireless sensor network where nodes cooperate with each other in an amplify-and-forward relaying scheme using partners assigned with the help of a worst-linkfirst partner selection algorithm. The outage probability and error rates which are computed with the proposed scheme are found in accordance with the theoretically predicted results, while keeping the computational effort such low that the optimum transmission power calculation can be performed on commercial low-cost sensor node hardware.