This is a soil moisture sensor module in the Sugar sensor series, the pin holes on the back allow compatibility with plastic building bricks.
Dimensions: 24 x 24 x 23 mm
Use a 3Pin cable to connect the module to Robotbit Edu.
MakeCode Programming Tutorial
Import Sugar Extension
Search for sugar in the search bar (Kittenbot products has been verified by Microsoft)
Sugar extension: https://github.com/KittenBot/pxt-sugar
Kittenblock Programming Tutorial
MicroPython Programming Tutorial
value(): Returns sensor value
from future import *
from sugar import *
moisture_P0 = Moisture('P0')
x = 0
screen.sync = 0
screen.fill((0, 0, 0))
screen.text(moisture_P0.value(),5,10,2,(0, 119, 255))
If you have any question, please feel free to contact us at Discord, we will always be there to help.