Menu Close

LEGO Robotics – Session 7 – Solar Car + Coding

Introduction

In this session, we’ll build a very simple solar car (meaning a little car that gets powered with a solar panel) and then we’ll hook up our spike prime coding platform on top of it and have some fun coding

Build Solar Car

First, let’s build our solar car as per the instruction here: Solar Vehicle (lego.com)

The building instructions are also available here:

Add our Spike Prime Kit

We want to have three functions

  • Measure the space we have in front, so we stop before we run into something
  • start and stop the car (we do this by opening/closing a lid over the solar panel 😉
  • display the distance we have in front

In order to add our spike prime, we add the following things to our solar car

Distance sensor in the front

We simply hook this up to the solar panel left and right.

Instructions

Lid for the solar panel with motor and touch button

Something like this

Spike Prime Controller

Instructions

Final result

It’ll look something like this:

And it works 🙂

Spike Prime Software