Energy Sensor
The Energy Sensor is a component in the Smart Solar Energy Kit. It measures electrical energy (supply) and can charge or power electronic components (load).
It can attach to blocks that come in the Climate Action Kit and Smart Solar Energy Kit.

MakeCode Extension
Each time you use this sensor, you’ll need to add the extension to your MakeCode project.

Create a new MakeCode File, and select the Extensions drawer from the toolbar.

Search for smart solar by Forward Education, and add it to your project.
Sensors

From the toolbar, select the Sensors drawer, and scroll to the Energy category.
The blocks within this category are used to measure electrical input and output when plugging objects into the sensor.
- Load: Connect using a USB cable, measures current in milliamps (mA)
- Supply: Connect using a micro USB cable, measures voltage in volts (V)
Current is Over/Under Value (mA)

A boolean block, which returns true or false compared to a user-selected value (a number). By default, the user-selected value is equal to 0.
The block only returns a value when an electrical object is plugged into the supply side of the sensor using a micro USB cable.
Over
- True: The current (mA) is greater than the selected value.
- False: The current (mA) is less than the selected value.
Under
- True: The current (mA) is less than the selected value
- False: The current (mA) is greater than the selected value
Current (mA)

A reporter block, which stores the value of current, in milliamps.
The block only returns a value when an electrical object is plugged into the load side of the sensor using a USB cable.
Voltage is Over/Under Value (V)

A boolean block, which returns true or false compared to a user-selected value (a number). By default, the user-selected value is equal to 0.
The block only returns a value when an electrical object is plugged into the supply side of the sensor using a micro USB cable.
Over
False: The voltage (V) is less than the selected value.
True: The voltage (V) is greater than the selected value.
Under
True: The voltage (V) is less than the selected value.
False: The voltage (V) is greater than the selected value.
Voltage (V)

A reporter block, which stores the value of voltage, in volts.
The block only returns a value when an electrical object is plugged into the supply side of the sensor using a micro USB cable.
Projects Using the Energy Sensor
Ready for more? Check out these projects featuring this sensor.
Feeling Stuck? Explore the Knowledge Base for common questions and troubleshooting tips.