# Machine Learning with Marshmallows and Tiny Sorter

## Overview

![](https://cdn-learn.adafruit.com/assets/assets/000/087/663/medium800thumb/projects_main-front.jpg?1580158410)

Machine learning is only about as complicated as cereal and marshmallows in this guide.

[This project from Google](https://experiments.withgoogle.com/tiny-sorter/view) uses a laptop's built-in camera to identify various cereal and marshmallows. The computer then sorts them based on a model you train. A [Circuit Playground Express](https://www.adafruit.com/product/3333) communicates with the computer to decide when to sort which marshmallow/cereal via a micro servo.

## Parts
### Circuit Playground Express

[Circuit Playground Express](https://www.adafruit.com/product/3333)
 **Circuit Playground Express** is the next step towards a perfect introduction to electronics and programming. We've taken the original Circuit Playground Classic and made it even better! Not only did we pack even more sensors in, we also made it even easier to...

Out of Stock
[Buy Now](https://www.adafruit.com/product/3333)
[Related Guides to the Product](https://learn.adafruit.com/products/3333/guides)
![A Black woman's manicured hand holds a round microcontroller with lit up LEDs.](https://cdn-shop.adafruit.com/640x480/3333-05.jpg)

### USB cable - USB A to Micro-B

[USB cable - USB A to Micro-B](https://www.adafruit.com/product/592)
This here is your standard A to micro-B USB cable, for USB 1.1 or 2.0. Perfect for connecting a PC to your Metro, Feather, Raspberry Pi or other dev-board or microcontroller

Approximately 3 feet / 1 meter long

In Stock
[Buy Now](https://www.adafruit.com/product/592)
[Related Guides to the Product](https://learn.adafruit.com/products/592/guides)
![USB cable - USB A to Micro-B - 3 foot long](https://cdn-shop.adafruit.com/640x480/592-01.jpg)

### Small Alligator Clip to Male Jumper Wire Bundle - 12 Pieces

[Small Alligator Clip to Male Jumper Wire Bundle - 12 Pieces](https://www.adafruit.com/product/3255)
For bread-boarding with unusual non-header-friendly surfaces, these cables will be your best friends! No longer will you have long strands of alligator clips that are grabbing little wires. These compact jumper cables have a premium male header on one end, and a grippy mini alligator clip on...

Out of Stock
[Buy Now](https://www.adafruit.com/product/3255)
[Related Guides to the Product](https://learn.adafruit.com/products/3255/guides)
![ Bundle of Small Alligator Clip to Male Jumper Wires](https://cdn-shop.adafruit.com/640x480/3255-02.jpg)

### Micro servo

[Micro servo](https://www.adafruit.com/product/169)
Tiny little servo can rotate approximately 180 degrees (90 in each direction) and works just like the standard kinds you're used to but _smaller_. You can use any servo code, hardware, or library to control these servos. Good for beginners who want to make stuff move without...

Out of Stock
[Buy Now](https://www.adafruit.com/product/169)
[Related Guides to the Product](https://learn.adafruit.com/products/169/guides)
![Micro servo with three pin cable](https://cdn-shop.adafruit.com/640x480/169-06.jpg)

## Other materials

- Printer
- 8.5" x 11" paper (cardstock preferred)
- Tape or glue stick
- Scissors or hobby knife
- Ruler
- Googly Eyes
- Cereal like Lucky Charms, or other bite-sized bits that can be classified in two parts.

## Optional parts (for 3D printing)
### Vibrating Mini Motor Disc

[Vibrating Mini Motor Disc](https://www.adafruit.com/product/1201)
\*BZZZZZZZZZZ\* Feel that? That's your little buzzing motor, and for any haptic feedback project you'll want to pick up a few of them. These vibe motors are tiny discs, completely sealed up so they're easy to use and embed.  
  
Two wires are used to control/power the vibe....

Out of Stock
[Buy Now](https://www.adafruit.com/product/1201)
[Related Guides to the Product](https://learn.adafruit.com/products/1201/guides)
![Vibrating Mini Motor Disc with two wires](https://cdn-shop.adafruit.com/640x480/1201-01.jpg)

### 20mm Coin Cell Breakout w/On-Off Switch (CR2032)

[20mm Coin Cell Breakout w/On-Off Switch (CR2032)](https://www.adafruit.com/product/1871)
Simple but effective - this sewable breakout board has a CR2032 coin cell battery holder soldered on, an on/off switch and 0.1" pitch breakout pins for easy connecting. Great for powering very low-current projects, or adding a battery backup circuit to a real-time-clock or similar....

In Stock
[Buy Now](https://www.adafruit.com/product/1871)
[Related Guides to the Product](https://learn.adafruit.com/products/1871/guides)
![Angled shot of a 20mm Coin Cell Breakout Board w/ On-Off Switch.](https://cdn-shop.adafruit.com/640x480/1871-08.jpg)

- [Next Page](https://learn.adafruit.com/machine-learning-with-marshmallows-and-tiny-sorter/sorter-assembly.md)

## Featured Products

### Circuit Playground Express

[Circuit Playground Express](https://www.adafruit.com/product/3333)
 **Circuit Playground Express** is the next step towards a perfect introduction to electronics and programming. We've taken the original Circuit Playground Classic and made it even better! Not only did we pack even more sensors in, we also made it even easier to...

Out of Stock
[Buy Now](https://www.adafruit.com/product/3333)
[Related Guides to the Product](https://learn.adafruit.com/products/3333/guides)
### Small Alligator Clip to Male Jumper Wire Bundle - 12 Pieces

[Small Alligator Clip to Male Jumper Wire Bundle - 12 Pieces](https://www.adafruit.com/product/3255)
For bread-boarding with unusual non-header-friendly surfaces, these cables will be your best friends! No longer will you have long strands of alligator clips that are grabbing little wires. These compact jumper cables have a premium male header on one end, and a grippy mini alligator clip on...

Out of Stock
[Buy Now](https://www.adafruit.com/product/3255)
[Related Guides to the Product](https://learn.adafruit.com/products/3255/guides)
### USB cable - USB A to Micro-B

[USB cable - USB A to Micro-B](https://www.adafruit.com/product/592)
This here is your standard A to micro-B USB cable, for USB 1.1 or 2.0. Perfect for connecting a PC to your Metro, Feather, Raspberry Pi or other dev-board or microcontroller

Approximately 3 feet / 1 meter long

In Stock
[Buy Now](https://www.adafruit.com/product/592)
[Related Guides to the Product](https://learn.adafruit.com/products/592/guides)
### Micro servo

[Micro servo](https://www.adafruit.com/product/169)
Tiny little servo can rotate approximately 180 degrees (90 in each direction) and works just like the standard kinds you're used to but _smaller_. You can use any servo code, hardware, or library to control these servos. Good for beginners who want to make stuff move without...

Out of Stock
[Buy Now](https://www.adafruit.com/product/169)
[Related Guides to the Product](https://learn.adafruit.com/products/169/guides)
### Adafruit PCB Ruler v2 - 6"

[Adafruit PCB Ruler v2 - 6"](https://www.adafruit.com/product/1554)
The first time you soldered up a surface mount component you may have been surprised "these are _really small_ parts!" and there's dozens of different names too! QFN, TDFN, SOIC, SOP, J-Lead, what do they mean and how can you tell how big they are? Now you can have a...

In Stock
[Buy Now](https://www.adafruit.com/product/1554)
[Related Guides to the Product](https://learn.adafruit.com/products/1554/guides)
### CR2032 Lithium Coin Cell Battery

[CR2032 Lithium Coin Cell Battery](https://www.adafruit.com/product/654)
A perfect match for our [sew-able coin cell holder](http://www.adafruit.com/products/653). This non-rechargeable coin cell is CR2032 sized: 20mm diameter, 3.2mm thick. It has a nominal voltage output of 3V (although it starts a little high at 3.2V and slowly drifts down to 2.5V as...

In Stock
[Buy Now](https://www.adafruit.com/product/654)
[Related Guides to the Product](https://learn.adafruit.com/products/654/guides)
### 20mm Coin Cell Breakout w/On-Off Switch (CR2032)

[20mm Coin Cell Breakout w/On-Off Switch (CR2032)](https://www.adafruit.com/product/1871)
Simple but effective - this sewable breakout board has a CR2032 coin cell battery holder soldered on, an on/off switch and 0.1" pitch breakout pins for easy connecting. Great for powering very low-current projects, or adding a battery backup circuit to a real-time-clock or similar....

In Stock
[Buy Now](https://www.adafruit.com/product/1871)
[Related Guides to the Product](https://learn.adafruit.com/products/1871/guides)
### Vibrating Mini Motor Disc

[Vibrating Mini Motor Disc](https://www.adafruit.com/product/1201)
\*BZZZZZZZZZZ\* Feel that? That's your little buzzing motor, and for any haptic feedback project you'll want to pick up a few of them. These vibe motors are tiny discs, completely sealed up so they're easy to use and embed.  
  
Two wires are used to control/power the vibe....

Out of Stock
[Buy Now](https://www.adafruit.com/product/1201)
[Related Guides to the Product](https://learn.adafruit.com/products/1201/guides)

## Related Guides

- [Adafruit Circuit Playground Express](https://learn.adafruit.com/adafruit-circuit-playground-express.md)
- [LED Breath Stats Mask](https://learn.adafruit.com/led-breath-stats-mask.md)
- [Spinning Logo](https://learn.adafruit.com/spinning-logo.md)
- [Makecode para la Circuit Playground Express](https://learn.adafruit.com/makecode-es.md)
- [Drone Claw](https://learn.adafruit.com/drone-claw.md)
- [Stroboscopic Zoetrope](https://learn.adafruit.com/strobe-zoetrope.md)
- [Using WebUSB with Arduino and TinyUSB](https://learn.adafruit.com/using-webusb-with-arduino-and-tinyusb.md)
- [Android GBoard Morse Code Control with Circuit Playground Express](https://learn.adafruit.com/android-gboard-morse-code-at-with-circuitplayground-express.md)
- [Zombie Tag Game with Circuit Playground Express](https://learn.adafruit.com/circuit-playground-express-ir-zombie-game.md)
- [Qu'est-ce que MakeCode?](https://learn.adafruit.com/makecode-fr.md)
- [Sparkle Skirt Playground](https://learn.adafruit.com/sparkle-skirt-playground.md)
- [Make it Move with Crickit](https://learn.adafruit.com/make-it-move-with-crickit.md)
- [Meeting Time Keeper Stick](https://learn.adafruit.com/meeting-time-keeper-stick-with-cpx.md)
- [Scratch 3 Walkthrough and Demo](https://learn.adafruit.com/guide-to-scratch-3.md)
- [Circuit Playground Express Perk-up Ears](https://learn.adafruit.com/perk-up-ears.md)
- [Circuit Playground Gizmo Ornaments](https://learn.adafruit.com/display-ornaments-with-circuit-playground.md)
