Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LEGO Spike Prime Learning Programs (SPIKE 3)

Fun, bite-sized Python programs for learning robotics with LEGO Spike Prime!

🎯 What You'll Learn

These programs teach you how to:

  • Control motors and create movement
  • Read sensors (color, distance, force)
  • Show images and text on the hub
  • React to button presses and motion
  • Build a line-following robot
  • Run multiple tasks simultaneously

📚 Lesson Overview

Beginner Lessons (5-10 minutes each)

  1. 01_hello_motor_spike3.py - Make a motor spin
  2. 02_color_sensor_spike3.py - Detect colors
  3. 03_distance_bot_spike3.py - Stop before hitting walls
  4. 04_force_sensor_spike3.py - Control motor with force sensor
  5. 05_motor_pair_spike3.py - Drive a robot with two motors
  6. 06_hub_display_spike3.py - Show images and text
  7. 07_button_control_spike3.py - React to button presses

Intermediate Lessons (10-15 minutes each)

  1. 08_line_follower_spike3.py - Build a line-following robot
  2. 09_motion_sensor_spike3.py - Detect tilt, shake, and orientation

Advanced Lesson (10+ minutes)

  1. 10_advanced_async_spike3.py - Run multiple tasks at once

🔧 Hardware Requirements

Each program lists what you need at the top:

  • LEGO Spike Prime Hub (required for all)
  • Motors (various ports)
  • Sensors (Color, Distance, Force)

🚀 Getting Started

  1. Read HOW_TO_RUN.md for setup instructions
  2. Start with Lesson 1
  3. Build the required hardware
  4. Copy code into LEGO Spike Prime App
  5. Run and experiment!

💡 Learning Tips

Read the comments - They explain each step ✅ Change the numbers - See what happens! ✅ Build first - Make sure hardware is ready ✅ Experiment - Try your own ideas

🆕 SPIKE 3 Features

These programs use the SPIKE 3 Python API which includes:

  • runloop module for async programming
  • Separate modules for each component (motor, color_sensor, etc.)
  • Improved performance and reliability
  • Better multi-tasking support

📖 Documentation

Official SPIKE 3 Python docs: https://tuftsceeo.github.io/SPIKEPythonDocs/SPIKE3.html

🎓 Next Steps

After completing these lessons:

  • Combine different sensors
  • Create your own robot designs
  • Build games and challenges
  • Explore the full API documentation

Happy coding! 🤖

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages