Micromelon Robotics
Platform
Resources
NewsAbout UsDownload
Support
Build Your Kit

Stay in the loop

New activities, teaching guides, and product updates delivered to your inbox.

Micromelon Robotics

Australian-made educational robotics for the next generation of innovators.

contact@micromelon.com.au

Company

  • About Us
  • Privacy Policy
  • Terms and Conditions

Products

  • Micromelon Rover
  • Code Editor
  • Robot Simulator
  • Junior
  • Python Library

Support

  • Resources
  • News
  • Rover Repairs
  • Contact
  • Build Your Kit

© 2026 Micromelon Robotics Pty Ltd. All rights reserved.

ABN 56 623 302 296

← Back to Resources
ActivitiesSimulator ActivitiesAdvanced

Activity: Seed Planter

Coding Skills

BranchingIterationAlgorithm Design

Rover Concepts

Colour
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.

Our Approach

Constant: a variable that never changes while the code is running. In Python, we write these in all capitals with underscores between words.

1Setting the Constants
  • Define two constants: CONE_UP (set to -60) and CONE_DOWN (set to -90).
  • These store the up and down positions for the cone servo.
  • The constants may need to be tweaked for your specific rover through trial and error.
2The Plant Function
  • Create a plant function that takes count as input and performs the whole act of planting a single cell.
  • First, the left servo moves the cone to the CONE_DOWN position, then delays 0.5 seconds.
  • If count is even (remainder of count / 2 = 0), the right servo spins the barrel clockwise (90 degrees); otherwise it spins counterclockwise (-90 degrees). This prevents seeds from jamming.
  • After another 0.5 second delay, the barrel is stopped (right servo to 0), the cone comes back up (CONE_UP), and the rover drives forward 10cm to the next cell.
3Prepare the Servos
  • In the main code, use "Set servo degrees" to initialise the left servo to CONE_UP and the right servo to 0.
  • This ensures the servos are in the correct positions before starting.
  • Add a 1 second delay to allow the servos to settle.
4The Planting Loop
  • Create a count loop from 0 to 20 by 1, storing the loop variable in count. Adjust the upper limit to match how many seeds you want to plant.
  • Inside the loop, call the plant function with the count variable as input. This makes the barrel spin back and forth each time the robot plants a seed.
  • Add a 1 second delay after each plant call.
5Complete Code
  • The full program: set constants, initialise servos, then loop 20 times calling the plant function with the current count.
  • The plant function lowers the cone, spins the barrel (alternating direction), stops the barrel, raises the cone, and drives forward.

Tip: Try making your own seed barrel and cone with different-sized holes for different seeds, a bit of variety in your garden!

Continue Learning

Activity: Claw AttachmentRelated resourceActivity: Claw AttachmentUse the claw attachment to grab the Meloncube and complete delivery tasks in a warehouse scenario, using the colour sensors to read delivery instructions.

Activity: Forklift AttachmentRelated resourceActivity: Forklift AttachmentUse the forklift attachment to lift and stack Meloncubes into increasingly taller towers, timing the servo precisely to reach each height.

Activity: Digger and TipperRelated resourceActivity: Digger and TipperUse the digger and tipper attachments together to build your own construction site, load grain-like material, transport it, and dump it in a new location.

← Return to Resources