Introduction In this book you will learn how technology is used in some modern vehicles You’ll find out how computer technology is changing traditional forms of transportation and enabling brand new forms to be invented We’ll spend some time looking at how the technology works in various types of transportation as well as learning about the different parts of each system We will also have a look inside the computer code that connects the components and brings things to life You’ll use the algorithms and ideas that control real forms of transportation technology to create your own programs These programs will help you understand how things work and set you on the road to dreaming up your own ideas for the future of transportation There are a lot of different ways to create code We will be using a website called Scratch to do our coding Type scratch mit edu into your web browser then click Create to start a new project 4
Let’s start by looking at the important parts of the screen in Scratch File Menu for logged-in users If you want you can create a free account and save your work online Check with a grown-up first Alternatively you can use the Load and Save options to open and save work on your computer Sound Library Add sounds to your program from here All Animals Effects Loops Notes Percussi New Save Now Save as a Copy Go to My Stuff New Load from your computer Upload to your computer Save to your computer Download to your computer Record and Export Video Revert File Menu for general users Choose Load and Save to open and save work on your computer File Edit Tutorials Code Costumes Sounds Motion move 10 steps turn 15 degrees turn 15 degrees Motion Looks Sound Events Control go to random position Sensing go to x 0 y 0 Operators glide 1 secs to random position Variables glide 1 secs to x 0 y 0 My Blocks point in direction 90 point towards mouse-pointer change x by 10 set x to 0 change y by 10 set y to 0 Block Categories Choose commands from these categories List of Commands Find the blocks you need by matching the color to the category name For example dark blue blocks will be found in the motion category A Bass A Elec Bass A Elec Guitar A Elec Piano A Minor Uk A Piano A Sax A Trombone Scripts Area Add your commands or code here Sprite1 Sprite1 Stage Backdrops The Stage Your program takes place on the Stage Sprites Objects that move around in Scratch are called sprites Sprites Pane Select which of your sprites you want to add code or sound to in this area Sprite Library Choose ready-made sprites for your programs Code Costumes Sounds costume3 Paint Editor This is used to draw your own sprites or backdrops Costume Pane Drawing Tools 5
Automotive Technology The first cars were on the road over 130 years ago These early cars were much simpler than today’s vehicles Over time electronics and computers started to play a bigger role in cars Computers now control how the different components of a car are connected together Cables and levers are being replaced by electronic switches wires computers and special motors called servos Let’s build our own car with code to see how these systems work STEP 1 Remove the cat Right-click the cat sprite and click delete Spri duplicate delete export STEP 2 Add a sprite Paint Hover over the Choose a Sprite button Click the Brush icon 6
STEP 3 Start drawing Convert to Bitmap Color 0 Filled Outlined Click Convert to Bitmap Select the Rectangle tool Choose a color for your Set the rectangle car to Filled STEP 4 Draw the car Start by drawing a rectangle Make it about three-quarters of the width of the drawing area Click the Line tool Make the line thicker 15 Draw the windshield Add a roof Draw the trunk and the windows STEP 5 Final details Add any other details with a thinner line in a darker color Click the Undo tool if you make a mistake Round the corners off with the Eraser For help go to www maxw com 7