# Tutorial for the color sorter

**URL:** https://forum.makecode.com/t/tutorial-for-the-color-sorter/566
**Category:** EV3
**Created:** [September 25, 2019, 11:50am UTC](https://forum.makecode.com/t/tutorial-for-the-color-sorter/566 "2019-09-25T11:50:46Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![sofiania](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/sofiania/32/21889_2.png) [@sofiania](https://forum.makecode.com/u/sofiania)
#### Post date: [September 25, 2019, 11:50am UTC](https://forum.makecode.com/t/tutorial-for-the-color-sorter/566/1 "2019-09-25T11:50:46Z")

</div>

Hi! I wonder if anyone has a tutorial for the color sorter where you save the colors and where its going in a list and then sort it to different cups after all colors are scanned. (Like theexisting example/tutorial in Labview, but with makecode).

---

<div class="post-metadata">

### Author: ![peli](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/peli/32/12_2.png) [@peli](https://forum.makecode.com/u/peli)
#### Post date: [September 26, 2019, 4:21am UTC](https://forum.makecode.com/t/tutorial-for-the-color-sorter/566/2 "2019-09-26T04:21:38Z")

</div>

We haven’t migrated the color sorter yet. Here are some of the core set programs we built in the past: [https://github.com/microsoft/pxt-ev3/tree/master/docs/examples](https://github.com/microsoft/pxt-ev3/tree/master/docs/examples) . Unfortunately I don’t have a color sorter at hand so I can translate the code but won’t be able to test it.

---

<div class="post-metadata">

### Author: ![peli](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/peli/32/12_2.png) [@peli](https://forum.makecode.com/u/peli)
#### Post date: [September 26, 2019, 5:03am UTC](https://forum.makecode.com/t/tutorial-for-the-color-sorter/566/3 "2019-09-26T05:03:33Z")

</div>

It would look like something like this: [https://makecode.com/\_gHrdKVHkLdwa](https://makecode.com/_gHrdKVHkLdwa) You’d probably want to break it all down in functions (or switch to JavaScript) to make easier to read.

---

<div class="post-metadata">

### Author: ![sofiania](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/sofiania/32/21889_2.png) [@sofiania](https://forum.makecode.com/u/sofiania)
#### Post date: [September 30, 2019, 11:08am UTC](https://forum.makecode.com/t/tutorial-for-the-color-sorter/566/4 "2019-09-30T11:08:50Z")

</div>

Stupid question maybe, but theese are not supposed to be empty I presume…  
On button pressed - else if current color = color

 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/1X/af29b8570fcfce4b9c7ac257bf420dd57f3cac3f.png)

---

<div class="post-metadata">

### Author: ![Badger](https://avatars.discourse-cdn.com/v4/letter/b/3bc359/32.png) [@Badger](https://forum.makecode.com/u/Badger)
#### Post date: [March 8, 2020, 4:03pm UTC](https://forum.makecode.com/t/tutorial-for-the-color-sorter/566/5 "2020-03-08T16:03:21Z")

</div>

Hi, I think this is what I have been looking for…

So is there a make code block /extension for an rgb colour sensor?

I am looking to incorporate the TCS34725 RGB Color Sensor within a project. Using make code.
