Introduction
In this lesson, you’ll build Larvy - the SPIKE larva robot! It’s named that way because it moves just like a larva or caterpillar. The program behind it is quite simple, with a core made up of just three movement blocks in a loop. We’ve added a few tweaks, though, to make it run more smoothly and consistently. You can read more about how it works in the program description.
But first - let’s build the robot!
Ларви - ЛЕГО СПАЙК Прайм робот ларва
Ларви е СПАЙК Прайм робот, който се движи като ларва или гъсеница. Роботът използва голям мотор, за да се свива и разпъва! С двата средни мотора, робота завърта 4 гуми по лице и изправени, когато трябва, за да може да се движи напред!
Можете да намерите програма за робота тук: Програма за Ларви - ЛЕГО СПАЙК Прайм робот
Before you download the program, make sure you have the SPIKE programming software installed.
To get the software, download the appropriate installer for your operating system from here: https://education.lego.com/en-us/downloads/spike-prime/software
Once downloaded, simply run the installer and it will set everything up for you.
To open the program we’ve provided below, just double-click the downloaded file and it should open with the SPIKE Prime software. Alternatively, you can open the SPIKE Prime software first, go to File → Open File, and select the downloaded file manually.
Програма за Ларви - ЛЕГО СПАЙК Прайм робот
Тази програма кара Ларви - ЛЕГО СПАЙК Прайм робот ларва да се движи безкрайно напред! Движението на този робот е много интересно, тъй като работи подобно на гъсеница или ларва! Програмата работи като повтаря 3 движения всеки цикъл:
- Предният мотор се завърта на 90 градуса, вдигайки или сваляйки колелата си
- Големият мотор се завърта на 90 градуса, свивайки или разпъвайки робота
- Задният мотор се завърта на 90 градуса. вдигайки или сваляйки колелата си
Може би забелязвате, че всяка команда прави две неща или същото, но в две посоки. Това се случва с променлива, която е или 1, или -1 и това дава посоката, в която да се движат моторите. Тази променлива също се използва за да се определи кой мотор трябва да използва пълна мощност и кой не трябва, за да не се счупи робота сам!
How to Connect Your Computer to the SPIKE Prime Hub
After downloading the SPIKE programming software, you’ll need to connect to your hub in order to load a program to your robot. Let’s take a look at how you can do that!
There are two ways to connect your computer to your hub: using a cable or via Bluetooth.
To connect with a cable, simply plug it into both your computer and the hub. They should connect automatically! This method also charges the hub’s battery.
Bluetooth is usually the preferred option because it gives your robot the freedom to move around the room. This makes it much easier to monitor things like sensor readings or variable values while the robot is in motion. We’ve shown how to do this in the video, but here’s a quick overview of the main steps:
- Turn on the hub by pressing and holding the center button for 1–2 seconds.
- Enable Bluetooth by pressing the Bluetooth button.
- Find your hub in the SPIKE app and connect to it—watch the video for a step-by-step guide on navigating to this option.