A rod mechanism for a garden tool comprises a first rod pivotally connected to the main body of the garden tool and lockable at least in the in-use position or in the storage position; wherein the first rod has an actuator and a locking component; wherein the locking component is unlocked from the main body of the garden tool by triggering the actuator, and the locking component is locked up with the garden tool main body by releasing the actuator; wherein the rod mechanism also includes a second rod movably connected with the first rod; wherein while the second rod moves to a preset position, the actuator may be triggered or released; wherein the main body of the garden tool has a position sensor, which is configured to generate a sensing signal when the first rod rotates to the in-use position and/or the storage position.