Table of Contents

Preface

Chapter 1: Getting Started with SPIKE Prime

Technical requirements

Overview of the kit

The cables for motors and sensors5

The Intelligent Hub6

Elements8

Sensors12

Motors14

Hub connection15

Programming

Creating a rock, paper, scissors wrist game

Coding a rock, paper, scissors wrist game

Making your own game

Summary

Chapter 2: Building an Industrial Robot Claw

Technical requirements

Building the base

Building the Intelligent Hub frame to move multidirectionally

Building the robot arm

Building the cargo

Writing the code

Identifying the ports65

The Intelligent Hub remote-control robot program66

Making it your own

Summary

Chapter 3: Building a LEGO Guitar

Technical requirements

Building the guitar

Assembling the guitar body77

Assembling the neck86

Building the color sensor slide bar88

Writing the code

The ports96

Playing the guitar

Making it your own

Summary

Chapter 4: Building a Mechanical Bird

Technical requirements

Building the body frame of the mechanical bird

Building the wings of the mechanical bird

Building the head and torso

Writing the code

The ports133

Calibrating the motors134

Wing movement135

Eyes and head movement135

Activating the bird

Making it your own

Summary

Chapter 5: Building a Sumobot

Technical requirements

Building the base

Building the ultrasonic sensor attachment

Building the force sensor attachment

Writing the code

The ports167

Code stack 1 – motors168

Code stack 2 – end program168

Code stack 3 – main program169

Code stack 4 – white edge program172

Code stack 5 – ultrasonic program173

Code stack 6 – force sensor program174

Making it your own

Summary

Chapter 6: Building a Dragster

Technical requirements

Building the dragster

Building the motor frame

Building the gear system and back wheels

Building the body of the dragster

Adding the body design

Coding the dragster

Connecting to the proper ports208

Code stack 1 – countdown timer and broadcast209

Code stack 2 – activating motors and stopping on the finish line211

Making it your own

Summary

Chapter 7: Building a Simon Says Game

Technical requirements 

Building the handheld game

Coding Simon Says

Code stack 1 – main code223

Code stack 2 – displaying images for player direction228

Code stack 3 – displaying images and sound for game sequence230

Code stack 4 – player input of answers234

Code stack 5 – game over sequence238

Code stack 6 – correct choice music sequence240

Making it your own 

Summary 

Other Books You May Enjoy

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset