Activity: Seed Planter

Use the seed planter attachment to start your own little garden. Organise your garden layout and have the rover precisely deposit seeds in soft soil. Cover it up as you go, and finish with some water!

Setup

For this task, you must purchase some garden seeds of your choice, research planting conditions, and find how far apart seeds must be planted. Prepare a garden bed or ground area to ensure the soil is tilled and soft. Get two long beams of solid material and lay them parallel to the rover tracks (the rover will use these like a train).

The seed planter attachment works by rotating the seed barrel so that seeds are loaded in it. Next, the barrel rotates out so the loaded seeds deposit into the planting cone. The attachment then drives the cone into the ground, pushing the seeds into the dirt.

Once all the prep is done, load the seeds into the seed tank on the attachment and program the rover to move and plant them at the correct intervals. Once a row is complete, move the beams to the next row and go again. Repeat until your garden bed is complete!

Note that the height of the planting cone may need to be adjusted depending on how high the robot is from the soil.

Here’s Our Approach

Constant - A constant is a variable that never changes when the code is run. In python, we write this in all capitals with underscores between words.

1) Setting the Constants:

Start by making constant variables to store the in and out positions of the seed barrel and the cone up and down positions.

The constants we have provided might need to be tweaked for your specific rover. This can be done through trial and error to find the best values for you.

2) The Plant Function:

A ‘plant’ function should also be made to perform the whole act of planting a single cell. First, the cone is moved to the down position. Next, with small delays, the wheel spins out and in to deposit the seeds. Then, the cone comes back up, and the rover drives forward to the next cell.




3) Prepare the Servos:

Back in the main code, the servos should be initialised to the ‘wheel_in’ and ‘cone_up’ positions. This is to ensure the servos are in the correct positions before starting. Add a 1 second delay to allow the servos to settle.

4) The Planting Loop:

Finally, create a loop that will execute several times, corresponding to how many seeds you want to be planted. Inside this loop, run the ‘plant’ function.



Complete Code:

Tip:

Try making your own seed paddle and cone with different-sized holes for your different seeds. That will help you add a bit of variety to your garden!

 

Related Posts

Previous
Previous

Frequently Asked Questions

Next
Next

Activity: Ping-Pong Shooter