Previous site

What Shall We Put in the Cart?

Let’s build a shopping cart that beeps when you put something in.

Build a sturdy shopping cart you can fill with anything.

What Shall We Put in the Cart?
Finished model

Blocks needed

  • × 1
  • × 1
  • × 1
  • × 1
  • × 23
  • × 31
  • × 2
  • × 2
  • × 1
  • × 2

How to build 19 steps

  1. Step 1
  2. Step 2
  3. Step 3
  4. Step 4
  5. Step 5
  6. Step 6
  7. Step 7
  8. Step 8
  9. Step 9
  10. Step 10
  11. Step 11
  12. Step 12
  13. Step 13
  14. Step 14
  15. Step 15
  16. Step 16
  17. Step 17
  18. Step 18
  19. Step 19
1 / 19

Coding mission

We’re shopping at the mall! Code the shopping cart to stop and beep by itself.

Blocks and their jobs

  • DC Motor Block ×2Shopping cart wheels
  • Proximity Sensor BlockSenses things in the cart
  • Sound BlockAlarm sound

Let's think

Code conditional statements with the Proximity Sensor Block.

The Proximity Sensor Block can sense things within 5 cm in front of it.

No obstacle

= The cart is empty.

Obstacle

= The cart is full.

Show the solution

While the cart is empty (no obstacle), it keeps moving forward. When it’s full (an obstacle in front of the proximity sensor), it stops. Then it plays “Do, Mi, Sol” and starts moving again.

Mission complete!

Built it and coded it? Tap to save your progress.