Smart Greenhouse

Hi everybody,

How has autumn went? It is almost December now! During the cold season it is almost impossible to grow any plants outdoors in our northern parameters. This concerns also this post’s topic which is a smart greenhouse! Especially at winter, vegetables and flowers are cultivated in them. Plants need the warmth, proper lightning and water of the greenhouse in order to grow. With today’s smart technology we are able to build a controller to monitor plants and adjust their growing conditions automatically!

In this blog post we are going to learn how to draw a green house and plants with RobboScratch and program Lab’s slider to adjust the functions of the smart green house!

Lets view one idea of how the greenhouse could look like:


View of the greenhouse during the night

View of the greenhouse during the day


This topic combines three school subjects: Environmental studies and biology, art and programming. Before programming it could be fruitful to discuss with children about the environmental aspect. Why do plants need sun for example. What is that about? How about the right temperature or water? Why plants need those to grow? They also learn to use digital devices to make art, because we draw all the elements ourselves. We especially encourage to draw with vector mode so children become familiar with the vector art. To the top of all we strengthen our programming skills and logical thinking skills!

Drawing and programming the greenhouse have several phases:

  1. Drawing the night and day backgrounds
  2. Drawing and programming the sun.
    • Changing the height of the sun with the Lab slider.
    • Programming backgrounds to change according to the sun’s height.
    • Changing the transparency of sun with the slider.
  3. Drawing the greenhouse
  4. Drawing the plants and their costumes. Program the plants to change their costumes according to the sun’s height.
  5. Drawing the fan and programming it to rotate according to the sun’s height.

After these phases children are able to draw vector art and utilize it with programming by themselves and add their own ideas to the green house. We will publish an own post about drawing with the RobboScratch in the future, in which we look a bit deeper into the subject!


1. Drawing the backgrounds


  • To draw the background choose brush from the left bottom corner
  • Draw the day and night costumes and name them.
  • It is possible to copy the first costume by clicking the costume and pressing sift at the same time, if you want to just change a part of it.

2. Drawing and programming the Sun

It is possible to draw a sun yourself. I just picked a ready made sprite from the gallery. The code for the sun looks like this:


3. Drawing the greenhouse

I recommend to draw the greenhouse as a new sprite. It is easier to adjust and it’s place is easier to change around the background.


  • To draw a new sprite click brush right next to text “New sprite”.
  • Change drawing mode to vector mode from the right bottom corner.
  • Draw a rectangle using the rectangle tool. Next choose reshape tool and click the rectangle on the screen. You will see the little joints appearing in the corners of the rectangle. Click the top line of the rectangle on the middle. A new joint will appear. Draw it up to shape the roof of the greenhouse.


4. Drawing and programming the flowers


  • Draw a flower and three costumes to it. Name them accordingly.
  • Utilize the vector mode to reshape leaves, pedals etc.

Next code the flower to blossom when sun rises and wither when sun goes down! The code will look like this:



5. Draw and program the fan

Start drawing the fan similarly than any other sprite before. Remember to adjust the center point of the fan, so it will rotate properly.


Code the fan to rotate when the Sun rises up and weather is hot! The code will look like this:



Gongratulations, you have drawn and coded the base of smart greenhouse! Now you have the tools to continue on adding your own ideas and further the base we have grounded.

Fruitful coding moments,



Leave a Reply