ig <b>17</b>. paying close attention</figcaption></figure><figure id="39c2"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*W6tle3not4xX9cXoXvwI9Q.gif"><figcaption>Fig <b>18</b>. catching a fright!</figcaption></figure>
<figure id="ba37">
<div>
<div>
<img class="ratio" src="http://placehold.it/16x9">
<iframe class="" src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FTlVeCBmefmY%3Ffeature%3Doembed&url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DTlVeCBmefmY&image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FTlVeCBmefmY%2Fhqdefault.jpg&key=a19fcc184b9711e1b4764040d3dc5c07&type=text%2Fhtml&schema=youtube" allowfullscreen="" frameborder="0" height="480" width="640">
</div>
</div>
</figure></iframe></div></div></figure><h2 id="594e">Are you Curious about Pixy?</h2><p id="13b6">This latest CMUcam version of the embedded camera is an image sensor with a powerful processor that you can program by only send the information you’re looking for so your microcontroller isn’t overwhelmed by data from the image sensor. The Pixy CMUCam also exports its information in a variety of useful ways — <a href="https://en.wikipedia.org/wiki/Universal_asynchronous_receiver/transmitter">UART</a> serial, SPI, I2C, digital out, or analog out — so your microcontroller can communicate easily while still doing other tasks. It’s so unobtrusive that you can even hook up multiple Pixy CMUCams to one microcontroller! Superb!</p><p id="cd49">The Pixy CMUCam5 also uses hue and saturation as its primary means of image detection — rather than the normal RGB. This means that lighting or exposure won’t affect the Pixy CMUCam’s detection of an item — which is a frustrating problem with many image sensors. It’s also a vast improvement over previous versions of the Pixy CMUCam, adding increased flexibility when it comes to lighting and exposure changes.</p><p id="97ae">It can also remember seven different color signatures, find hundreds of objects at the same time, and is super fast — processing at <b>50 frames</b> a second.</p><p id="eb6d">Finally, the Pixy CMUCam is also teachable so you can set it up to only send you images that you’ve specifically told it to look for. It’s easy and fast and has an open source application called PixyMon.</p><p id="4cd9">Each Pixy CMUcam5 Sensor comes with a 6-pin-to-10-pin IDC cable and mounting tabs and screws.</p><p id="c22f"><b>Specifications:</b></p><div id="f7fa"><pre><span class="hljs-bullet">. </span>Processor: NXP LPC4330, 204 MHz, dual core;
<span class="hljs-bullet">. </span>Image sensor: Omnivision OV9715, 1/4", 1280x800;
<span class="hljs-bullet">. </span>Lens field-of-view: 75 degrees horizontal, 47 degrees vertical;
<span class="hljs-bullet">. </span>Lens type: standard M12 (several different types available;
<span class="hljs-bullet">. </span>Power consumption: 140 mA typical;
<span class="hljs-bullet">. </span>Power input: USB input (5V) or unregulated input (6V to 10V);
<span class="hljs-bullet">. </span>RAM: 264K bytes;
<span class="hljs-bullet">. </span>Flash: 1M bytes;
<span class="hljs-bullet">. </span>Available data outputs: UART serial, SPI, I2C, USB, digital, analog;
<span class="hljs-bullet">. </span>Dimensions: 2.1" x 2.0" x 1.4;
<span class="hljs-bullet">. </span>Weight: 27 grams;</pre></div><p id="7c87"><b>Features:</b></p><div id="b112"><pre>. Small, fast, easy-<span class="hljs-keyword">to</span>-use, low-<span class="hljs-keyword">cost</span>, readily-available vision <span class="hljs-keyword">system</span>;
. Learns <span class="hljs-keyword">to</span> detect objects that you teach it;
. Outputs what it detects <span class="hljs-number">50</span> times per second;
. Connects <span class="hljs-keyword">to</span> Arduino <span class="hljs-keyword">with</span> the included cable. <span class="hljs-keyword">Also</span> works <span class="hljs-keyword">with</span> Raspberry Pi, BeagleBone <span class="hljs-keyword">and</span> <span class="hljs-keyword">similar</span> controllers;
. <span class="hljs-keyword">All</span> libraries <span class="hljs-keyword">for</span> Arduino, Raspberry Pi, etc. are provided;
. C/C++ <span class="hljs-keyword">and</span> Python are supported;
. Communicates via one <span class="hljs-keyword">of</span> several interfaces: SPI, I2C, UART, USB <span class="hljs-keyword">or</span> analog/digital output;
. <span class="hljs-keyword">Configuration</span> utility runs <span class="hljs-keyword">on</span> Windows, MacOS <span class="hljs-keyword">and</span> Linux;
. <span class="hljs-keyword">All</span> software/firmare <span class="hljs-keyword">is</span> <span class="hljs-keyword">open</span>-source GNU-licensed;
. <span class="hljs-keyword">All</span> hardware documentation including schematics, bill <span class="hljs-keyword">of</span> materials, PCB layout, etc. are provided;
. Pixy can remember <span class="hljs-keyword">and</span> identify <span class="hljs-number">7</span> colour signatures;
. Pixy can track <span class="hljs-number">100</span>’s <span class="hljs-keyword">of</span> objects simultaneously;
. Pixy interfaces <span class="hljs-keyword">to</span> a PC via USB <span class="hljs-keyword">and</span> the PixyMon Application;.
</pre></div><h2 id="6d5a">Credits and References</h2><div id="565f" class="link-block">
<a href="https://charmedlabs.com/default/products/">
<div>
<div>
<h2>Products - Charmed Labs</h2>
<div><h3>New! Pixy2 for Lego Connects directly to EV3 brick Free Pixy2 Lego software block for easy programming Pixy2 Faster…</h3></div>
<div><p>charmedlabs.com</p></div>
</div>
<div>
<div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*jmc3RwL44nQLWaGi)"></div>
</div>
</div>
</a>
</div><div id="be52" class="link-block">
<a href="http://www.informit.com/articles/article.aspx?p=2454873">
<div>
<div>
<h2>Hacking Your LEGO Mindstorms EV3 Kit: Connections | Mindstorms Wires Explained | InformIT</h2>
<div><h3>Mindstorms' components use wires to link the power and data of modules together. This chapter from Hacking Your LEGO…</h3></div>
<div><p>www.informit.com</p></div>
</div>
<div>
<div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*NstbGBJk8XFlHjot)"></div>
</div>
</div>
</a>
</div><p id="4839"><a href="http://www.philohome.com/crimp/crimp.htm">NXT® plugs crimping tool</a> from philohome.com</p><div id="673d" class="link-block">
<a href="https://learn.adafruit.com/pixy-pet-robot-color-vision
Options
-follower-using-pixycam">
<div>
<div>
<h2>Pixy Pet Robot - Color vision follower</h2>
<div><h3>This project pairs the super-awsome Pixy CMUCam-5 vision system with the high performance Zumo robot platform…</h3></div>
<div><p>learn.adafruit.com</p></div>
</div>
<div>
<div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*mN9OnewhHwwHISbp)"></div>
</div>
</div>
</a>
</div><p id="4e6f"><a href="https://electropeak.com/learn/introduction-to-image-processing-pixy-and-alternatives/">An Introduction to Image Processing; Pixy & Its Alternatives</a> from <a href="https://electropeak.com/">https://electropeak.com</a></p><figure id="d60e"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*vCIhfJ-p3-GvWWje19u1MQ.jpeg"><figcaption>Fig<b> 20</b>. Pixy box</figcaption></figure><figure id="41a8"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*5Y0FFgxsTVwKWeQYUeg4bg.gif"><figcaption>Fig <b>21</b>. Thank you for reading! If you like it, favorite! Subscribe!</figcaption></figure><p id="9c8a">Related Posts</p><p id="2af3">76 Ardu_Serie — <a href="https://readmedium.com/arduino-meets-pixy-36138c474912"><b>Arduino Meets Pixy </b></a>— How-To Get Up & Running Flying Pixy!</p><p id="4518">01º Lego Episode — <a href="https://readmedium.com/lego-our-startups-journey-2db83f9e92a4"><b>Our Startup’s Journey</b> </a>— Invaders and Invasions?</p><p id="da00">02º Lego Episode — <a href="https://readmedium.com/timmyton-lego-adventures-02-faae7d8c6fea"><b>Timmyton </b>— <b>Lego-Learning-By-Playing — L2BP Series</b></a></p><p id="b1d2">04º Lego Episode — <a href="https://readmedium.com/lego-motions-episode-04-41dff47e8834"><b>Lego Motions</b> — <b>Tribot v 1.0</b> — <b>Seeing Your Creation Move</b> </a>— Move Steering Block</p><p id="0d41">05º Lego Episode — <a href="https://readmedium.com/lego-motions-move-tribot-around-deb227946425"><b>Lego Motions </b>— <b>Move Tribot Around</b> </a>— And Backward…Five Programs Files</p><p id="98f9">06º Lego Episode — <a href="https://readmedium.com/lego-sensors-touch-n-color-edbe0f6642f"><b>Lego Sensors</b> — <b>Touch N Color</b></a> — Two out of five human senses — Touch N Sight</p><p id="3976">07º Lego Episode — <a href="https://readmedium.com/lego-sensor-color-5db4d42e0203"><b>Lego Sensor </b>— <b>LineFollower</b> </a>— Line Follower Tribot v1.0</p><p id="5939">08º Lego Episode — <a href="https://readmedium.com/maze-solving-tribot-v1-0-a29963f8742a"><b>Maze Solving Robot v1</b></a><b> </b>— Lego Solution Right-Wall-Follower-Robot</p><p id="b7c2">09° Lego Episode — <a href="https://readmedium.com/lego-gettle-sound-bots-5fb40f6d84df"><b>Gettle_&_Sound_Bots</b></a> — How gentle can a robot be? What is the audible range of the human ear? How deep can we dive?</p><p id="9a96">10° Lego Episode — <a href="https://readmedium.com/lego-data-logging-a2fd59dd7933"><b>Data Logging</b></a> — Data Collection and the EV3</p><p id="14df">11º Lego Episode — <a href="https://readmedium.com/lego-binning-the-linefollower-code-5562e059237e"><b>Binning the LineFollower Code </b></a>— Binning: Arithmetic To Map Sensor Reading</p><p id="2380">12° Lego Episode — <a href="https://readmedium.com/lego-a-proportional-linefollower-robot-d9a951debbef"><b>A Proportional LineFollower Robot </b></a>— Advanced Math To Improve Your Robot’s Steering</p><p id="8b82">8th KidSeries — <a href="https://readmedium.com/j3-folower-line-robot-v1-0-7ad68256de83"><b>J3 Follower Line Robot v1.0</b></a> — The Simplest Follower Line Robot</p><p id="8ab6">13º LEGO Theory — <a href="https://readmedium.com/lego-theory-multitasking-2f060d2e3678"><b>Multitasking </b></a>— A very Useful Programming Technique</p><p id="c586">14° LEGO formula — <a href="https://readmedium.com/lego-formula-normalizing-data-66fefd9eb90e?postPublishedType=repub"><b>Normalizing Data</b></a> — Converting Data to Use The Same Range</p><p id="e388">15º Lego Episode — <a href="https://readmedium.com/lego-pid-the-ultimate-line-follower-45d4e517572b"><b>PID — The Ultimate Line Follower </b></a>— Algorithm for your EV3 PID Line Follower Robot</p><p id="d722">16 ° <a href="https://readmedium.com/lego-meets-pixy-8f8ea7677114?postPublishedType=repub"><b>Lego Meets Pixy Episode</b></a> — How to Connect Your Inexpensive Camera Module to Lego</p><p id="3ff1">18° Lego Episode — <a href="https://readmedium.com/lego-gears-worms-bf8ef3280d0e"><b>GEARS & WORMS</b></a> — Geartrains & Worm & Clutch Gears</p><p id="66e8">23° Lego Episode — <a href="https://readmedium.com/lego-differential-explained-12fa1865f3db"><b>Differential Explained</b></a><b> </b>— How Differential Works?</p><p id="05fa">24° Lego Episode — <a href="https://readmedium.com/pitbot-a-star-is-born-e04a0f305fb6?source=post_page---------------------------"><b>PitBot — A Star Is Born </b></a>— Working at The First Structure in Our Sparring Robot</p><p id="fb6b">25° Lego Episode — <a href="https://readmedium.com/pitbot-is-agressive-well-no-worries-c801adba4b4c?source=post_page---------------------------"><b>PitBot Is Agressive? Well, No Worries! </b></a>— Making PitBot bite!</p><p id="2069">26° Lego Episode — <a href="https://readmedium.com/dancing-good-w-pitbot-16b5ef035077"><b>Dancing Good w/ PitBot</b></a> — All The Secret for Replicate This Awesome Robot</p><p id="14c4">27 ° LEGO Episode — <a href="https://readmedium.com/lego-sumo-arena-is-ready-64a59e8bf987"><b>Sumo Arena is Ready! </b></a>— Here is the playing arena for Arduino x Lego</p><p id="3940">28 ° LEGO Episode — <a href="https://readmedium.com/pick-pitbot-up-7dbfa4edc12e"><b>Pick Pitbot Up!</b></a> — Our Robot Are Leaving Body & Paint Shop</p><p id="92eb">28 ° LEGO — B — Episode — <a href="https://readmedium.com/pitbot-battery-sensor-setup-4f572fedfe20"><b>Pitbot Battery & Sensor Setup</b></a> — Preparing The infrastructure for running Arduino code</p><p id="82dc">29 ° LEGO Episode — <a href="https://readmedium.com/bridging-all-sensors-together-pitbot-ca8803bf9cb"><b>Bridging All Sensors Together</b></a> — Pitbot — Collecting All Codes for the Final Act of Giving Behaviors to Robot</p>
<figure id="97be">
<div>
<div>
<img class="ratio" src="http://placehold.it/16x9">
<iframe class="" src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fj6YsZmXwjms%3Ffeature%3Doembed&url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dj6YsZmXwjms&image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fj6YsZmXwjms%2Fhqdefault.jpg&key=a19fcc184b9711e1b4764040d3dc5c07&type=text%2Fhtml&schema=youtube" allowfullscreen="" frameborder="0" height="480" width="854">
</div>
</div>
</figure></iframe></div></div></figure></article></body>
Lego Meets Pixy
How to Connect Your Inexpensive Camera Module to Lego — Episode #16
Yes! We are now carrying CMUcam 5, or know as Pixy! It can detect purple dinosaur :) The camera is designed to be added onto robots outfitted. But, the question is: How to get Lego plus Pixy linked together? Welcome to this How-to!
Fig 1. Lego and Pixy together! Jump to videos? to see my Lego’s youtube playlist — click here;)
Mindstorms Wires Explained
Let's begin by exploring all the nitty-gritty details of the standard Mindstorms wire. Lego uses semi-proprietary wires RJ12 variant in its Mindstorms’ Intelligent Brick access and connections methods.
Mindstorms wires are essentially proprietary RJ12 connectors with off-center tabs:
Fig 2. Lego RJ12’s connectors variant
Inside the Mindstorms Wire
Fig 3. Cut the Black (Gnd) and White (Analog) wires for this lab
The blue wire is the SDA (serial data) wire, one-half of a two-wire data transfer protocol called I2C. EV3 can transmit sensor data and commands through the I2C bus;
Yellow is the SCL (serial clock) wire, the other half of the protocol;
Green is power, typically delivering either 3.3 or 5V from the EV3' battery pack. You can use this wire to power electronics circuitry and add-on modules;
Red is ground. Creating a circuit with this ground and the power pin yields 5V;
Black is also ground. A circuit with this ground and the power pin yields 3.3v;
White is analog, transmitting analog sensor signal back to the EV3 Intelligent Brick.
Now we need to understand the Pixy cradle and servos pinout.
Pixy can be interfaced to several protocols — I2C, Serial, and SPI — plus it controls two servos for pan-tilt functionality.
Fig 10. Hacking Lego’s semi-proprietary RJ12 connector to fit grip toolFig 11. Comparing Lego’s semi-proprietary RJ12 with industrial RJ12 plug (center)Fig 12. Crimping Lego’s RJ12 with a regular tool
Running Pixy PID code
Here is the working chase code provided by Pixy’s Charmed Lab:
Fig 14. Chase code
Run PixyMon to Configure Pixy For Lego Capability
Fig 15. If you don’t know how-to see This Pixy EpisodeFig 16. Chasing yellow cupFig 17. paying close attentionFig 18. catching a fright!
Are you Curious about Pixy?
This latest CMUcam version of the embedded camera is an image sensor with a powerful processor that you can program by only send the information you’re looking for so your microcontroller isn’t overwhelmed by data from the image sensor. The Pixy CMUCam also exports its information in a variety of useful ways — UART serial, SPI, I2C, digital out, or analog out — so your microcontroller can communicate easily while still doing other tasks. It’s so unobtrusive that you can even hook up multiple Pixy CMUCams to one microcontroller! Superb!
The Pixy CMUCam5 also uses hue and saturation as its primary means of image detection — rather than the normal RGB. This means that lighting or exposure won’t affect the Pixy CMUCam’s detection of an item — which is a frustrating problem with many image sensors. It’s also a vast improvement over previous versions of the Pixy CMUCam, adding increased flexibility when it comes to lighting and exposure changes.
It can also remember seven different color signatures, find hundreds of objects at the same time, and is super fast — processing at 50 frames a second.
Finally, the Pixy CMUCam is also teachable so you can set it up to only send you images that you’ve specifically told it to look for. It’s easy and fast and has an open source application called PixyMon.
Each Pixy CMUcam5 Sensor comes with a 6-pin-to-10-pin IDC cable and mounting tabs and screws.
Specifications:
. Processor: NXP LPC4330, 204 MHz, dual core;
. Image sensor: Omnivision OV9715, 1/4", 1280x800;
. Lens field-of-view: 75 degrees horizontal, 47 degrees vertical;
. Lens type: standard M12 (several different types available;
. Power consumption: 140 mA typical;
. Power input: USB input (5V) or unregulated input (6V to 10V);
. RAM: 264K bytes;
. Flash: 1M bytes;
. Available data outputs: UART serial, SPI, I2C, USB, digital, analog;
. Dimensions: 2.1" x 2.0" x 1.4;
. Weight: 27 grams;
Features:
. Small, fast, easy-to-use, low-cost, readily-available vision system;
. Learns to detect objects that you teach it;
. Outputs what it detects 50 times per second;
. Connects to Arduino with the included cable. Also works with Raspberry Pi, BeagleBone andsimilar controllers;
. All libraries for Arduino, Raspberry Pi, etc. are provided;
. C/C++ and Python are supported;
. Communicates via one of several interfaces: SPI, I2C, UART, USB or analog/digital output;
. Configuration utility runs on Windows, MacOS and Linux;
. All software/firmare isopen-source GNU-licensed;
. All hardware documentation including schematics, bill of materials, PCB layout, etc. are provided;
. Pixy can remember and identify 7 colour signatures;
. Pixy can track 100’s of objects simultaneously;
. Pixy interfaces to a PC via USB and the PixyMon Application;.