js-built_in">to</span> <span class="hljs-keyword">the</span> left/up <span class="hljs-keyword">and</span> <span class="hljs-literal">right</span>/down <span class="hljs-keyword">as</span> <span class="hljs-keyword">the</span> motor spins; The mechanism that guarantees <span class="hljs-keyword">it</span> is Cam-And-Rod Mechanisms.</pre></div><figure id="0c46"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*P1mmpDEQCWBdd2HoZp02bQ.png"><figcaption></figcaption></figure><h1 id="ac4f">Programming</h1><h2 id="8cd7">1.Custom GUI</h2><div id="d3ff"><pre>The Timmyton’s custom GUI is <span class="hljs-keyword">among</span> <span class="hljs-keyword">the</span> robot’s most innovative features. It streamlines all <span class="hljs-keyword">of</span> <span class="hljs-keyword">the</span> robot’s programs <span class="hljs-keyword">into</span> <span class="hljs-literal">one</span> user-friendly package;)</pre></div><figure id="ac01"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*6AQ7L92_MKduWAMxCuQHqg.png"><figcaption>Many <a href="https://g.co/kgs/5Emp5X"><b>First Lego League (FFL)</b></a> teams have decided to use custom GUI’s to make changing programs quicker and easier, saving precious time on the competition field.</figcaption></figure><h2 id="9577">2.Beacon Following</h2><div id="8bbf"><pre>The robot needs <span class="hljs-keyword">to</span> steer itself <span class="hljs-keyword">while</span> <span class="hljs-keyword">it</span> follows <span class="hljs-keyword">the</span> beacon. IR <span class="hljs-number">1</span> will <span class="hljs-built_in">read</span> <span class="hljs-keyword">the</span> heading <span class="hljs-keyword">of</span> <span class="hljs-keyword">the</span> nearby beacon, <span class="hljs-keyword">and</span> <span class="hljs-keyword">the</span> robot will use <span class="hljs-keyword">the</span> heading value <span class="hljs-keyword">to</span> adjust <span class="hljs-keyword">its</span> steering <span class="hljs-keyword">to</span> keep itself <span class="hljs-keyword">on</span> track <span class="hljs-keyword">with</span> <span class="hljs-keyword">the</span> beacon. IR <span class="hljs-number">1</span> will also measure <span class="hljs-keyword">the</span> distance <span class="hljs-keyword">to</span> <span class="hljs-keyword">the</span> beacon so <span class="hljs-keyword">that</span> <span class="hljs-keyword">it</span> can slow down when <span class="hljs-keyword">the</span> beacon gets closer.</pre></div><h2 id="417a">3.Tank-Style Remote Control</h2><div id="417d"><pre>The program that controls Timmyton’s <span class="hljs-keyword">movement </span>uses <span class="hljs-keyword">both </span><span class="hljs-keyword">direction </span><span class="hljs-keyword">and </span>magnitude to adjust its steering. This is called a proportional <span class="hljs-keyword">beacon </span>follower.</pre></div><p id="4fd5"><b>Proportional </b>logic refers to a feedback loop in which the <b>correction </b>made by the system is <b>proportional </b>to the <b>observed error</b>. In the future, we will see <a href="https://g.co/kgs/YjV4vw">PID (proportional integral derivative) Controller</a> ;)</p><h2 id="3449">4.Obstacle Detection/Avoidance</h2><div id="3378"><pre>The proposed obstacle detection algorithm mimics <span class="hljs-keyword">the</span> human behavior <span class="hljs-keyword">of</span> detecting <span class="hljs-keyword">the</span> obstacles that are located <span class="hljs-keyword">in</span> front <span class="hljs-keyword">of</span> <span class="hljs-keyword">the</span> Timmyton during motion.</pre></div><figure id="5e90"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*ghW0jpgAgcNfmTKFNp3vwg.png"><figcaption></figcaption></figure><h2 id="aea8">5.Give a Robot its own Personality</h2><div id="1102"><pre>The purpose <span class="hljs-keyword">of</span> programming <span class="hljs-keyword">is</span> <span class="hljs-keyword">to</span> give <span class="hljs-keyword">to</span> your creation <span class="hljs-keyword">its</span> own personality. This means <span class="hljs-keyword">that</span> each <span class="hljs-keyword">of</span> your creations will behave differently. This <span class="hljs-keyword">is</span> an art <span class="hljs-keyword">of</span> programming <span class="hljs-keyword">that</span> you learn <span class="hljs-keyword">from</span> practice, <span class="hljs-keyword">at</span> each projects <span class="hljs-keyword">that</span> you will make:D</pre></div><h2 id="f5ff">6.Project Multiple Revision</h2><p id="c20c">It took many revision to refine the Timmyton to the polished state it is now.</p><div id="76ca"><pre>It <span class="hljs-keyword">is</span> very rare that <span class="hljs-keyword">an</span> engineer gets <span class="hljs-keyword">a</span> project perfect <span class="hljs-keyword">on</span> the <span class="hljs-keyword">first</span> <span class="hljs-keyword">try</span>, <span class="hljs-keyword">so</span> <span class="hljs-keyword">do</span> not <span class="hljs-keyword">be</span> afraid <span class="hljs-keyword">to</span> experiment <span class="hljs-built_in">and</span> <span class="hljs-keyword">continue</span> modifying your design!</pre></div><h1 id="ca00">Program RC Mode Only:)</h1><figure id="2eb0"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*1I8Q3taF4eEQ5dpuIxf1mg.png"><figcaption></figcaption></figure><p id="b17b">With these instructions, Timmyton is under the command of the remote control. Each button has its instruction set, one turns the engine forward another one backward and so on.</p><figure id="5b66"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*xVwxG8okZpi-hXMm97L3ww.png"><figcaption>Simplifying the code :)</figcaption></figure><p id="96ad">In essence, the above image is the flow of all process; it is so simple that you can simply enter this structure initially, and add step-by-step operations; The main loop, within each brick button, takes care of all specific operation of Timmyton behavior.</p><p id="9b0a">The second thread is used for interruptions purpose of the main loop called <i>Mode Loop</i>.</p><p id="eb75">Both threads run in parallel.</p><p id="a953">As soon as you pressed the center brick button (ID=2) the loop named <i>Mode Loop</i> is interrupted and you are back to the <i>menu graphic</i> screen (below:)</p><figure id="b6ef"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*ZqZc3jNzLcBKmM6krwgj8Q.png"><figc
Options
aption>Use this image to create your own menu: <b>Tool > Image Editor</b></figcaption></figure><p id="c4fb">Go code according to your pace of learning and go test on hardware. That is, debug it! Watch. Learn. Do ;)</p><p id="c436">Got the vision?</p><p id="58ee">That’s all folks! The rest of the code you take care of by <a href="https://builderdude35.com/downloads-2/">download the code from Buiderdude35</a>’s page and you’re done!</p><p id="0916">Thanks for joining us:) Until the next episode of Lego’s adventures o/</p><p id="1fc6">Stay tuned!</p><h2 id="914c">Troubleshooting</h2><ul><li>The bevel gear is not locked. Constantly the tail disconnects and we have to remove the brick to access and repair the differential; We have to find a way to get the bevel gear locked;</li><li>Bright colors are not recognized immediately by the color sensor; It is better to use papers instead of lego blocks and bricks;</li><li>If the mouth stays just closed the color sensor will probably read red (tooth) or another reflective color :/ white or blue; We would have to find a way to always finish the Hungry Mode with Timmyton mouths’ wide open; but how? you tell me….</li><li>The wires are too tight in the design; Fit them carefully;</li><li>The code is more laborious than difficult; Just understand the simplification above and you are ready to let your genius and creativity flow;)</li></ul><p id="1b32"><a href="https://drive.google.com/open?id=1BSF2A_baDQ-iPYeB9rRlHrS-C7Mbhquu">Download All Files For This Project</a></p><h1 id="a673">Related Posts:</h1><p id="eed4">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="c97f">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="ee35">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="a7d9">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="6927">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="44fc">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="c637">13º LEGO Theory — <a href="https://readmedium.com/lego-theory-multitasking-2f060d2e3678"><b>Theory of Multitasking</b></a> — A very Useful Programming Technique</p><p id="389c">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="0044">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="114e">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="b657">18° Lego Episode — <a href="https://readmedium.com/lego-gears-worms-bf8ef3280d0e"><b>GEARS & WORMS</b></a> — Geartrains & Worm & Clutch Gears</p><p id="edea">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="e294">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="741f">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="57bb">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="e42b">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="641a">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="e62d">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="7e9b">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><h1 id="546a">Credits & References</h1><p id="d120"><a href="https://g.co/kgs/D6F5CU">Building Smart LEGO MINDSTORMS EV3 Robots</a> by Kyle Markland (thank you, dude:)</p><p id="00e9"><a href="https://builderdude35.com/downloads-2/">Builderdude35</a></p></article></body>
Lego-Learning-By-Playing Series— Timmyton
Lego Adventures— L2BP Series — Episode #02
The purpose of this article is to give my son an English class while he plays LEGO. With time I hope he publishes his own article directly in English as a second language (speaking almost naturally=)
LEGO Digital Designer (LDD) is a freeware computer program produced bythe Lego Group; The program allows users to build models using virtual Lego bricks, ina computer-aided design like manner.
Let’s discuss some aspect of Timmyton’s Kyle design:
Building Techniques
1.Exterior Design
Considerable effort was putinto designing the Timmyton exterior; It is a shark-like robot; Timmyton were designed witha purely cosmetic purpose so that the robot is instantly recognizable asa shark.
Three aspects should jump out at you: Pectoral fins, (chopping) Jaws and (wagging) Tail.
2.Caster Wheels for maximum mobility
It isa small wheel mounted onavertical axle.
Functions:
It can swivel in any direction;
It can pivot in any direction, meaning it will follow the front two wheels wherever they steer;
It ensures maneuverability in every direction;
It is the go-to choice whenever an engineer needs a floating wheel that supports the machine’s weight without hindering mobility;
Supermarket trolley have mechanisms of Caster Wheels
3.Bevel Gear’s parallel and 90° gear meshes
Bevel gears are a special typeof gear.
Gearbox is visible on the underside of the robot near the mouth:
They have a conventional circular shape like spur gears, but the corners of their teeth are cut at an angle;
This allows them to form 90-degree connections with one another while still being able to form conventional parallel gear meshes like spur gears can;
The Timmyton takes advantage of the bevel gear’s ability to form both types of connections; this is how the Timmyton splits the power from one the motor within a compact footprint.
Engineering Principles
1.Tank-style Steering
Even though there are no tank tracks, the drivetrain ofthe Timmyton is still classified as tank-style because the Timmyton steers by varying the power sent toeach motor side.
2.Cam-And-Rod Mechanisms
The rod connects tothe tail and jaws, causing they to make a continuous movement tothe left/up andright/down asthe motor spins; The mechanism that guarantees it is Cam-And-Rod Mechanisms.
Programming
1.Custom GUI
The Timmyton’s custom GUI is amongthe robot’s most innovative features. It streamlines all ofthe robot’s programs intoone user-friendly package;)
Many First Lego League (FFL) teams have decided to use custom GUI’s to make changing programs quicker and easier, saving precious time on the competition field.
2.Beacon Following
The robot needs to steer itself whileit follows the beacon. IR 1 will readthe heading ofthe nearby beacon, andthe robot will use the heading value to adjust its steering to keep itself on track withthe beacon. IR 1 will also measure the distance tothe beacon so thatit can slow down when the beacon gets closer.
3.Tank-Style Remote Control
The program that controls Timmyton’s movement uses both direction and magnitude to adjust its steering. This is called a proportional beacon follower.
Proportional logic refers to a feedback loop in which the correction made by the system is proportional to the observed error. In the future, we will see PID (proportional integral derivative) Controller ;)
4.Obstacle Detection/Avoidance
The proposed obstacle detection algorithm mimics the human behavior of detecting the obstacles that are located in front ofthe Timmyton during motion.
5.Give a Robot its own Personality
The purpose of programming isto give to your creation its own personality. This means that each of your creations will behave differently. This is an art of programming that you learn from practice, at each projects that you will make:D
6.Project Multiple Revision
It took many revision to refine the Timmyton to the polished state it is now.
It is very rare that an engineer gets a project perfect on the firsttry, sodo not be afraid to experiment andcontinue modifying your design!
Program RC Mode Only:)
With these instructions, Timmyton is under the command of the remote control. Each button has its instruction set, one turns the engine forward another one backward and so on.
Simplifying the code :)
In essence, the above image is the flow of all process; it is so simple that you can simply enter this structure initially, and add step-by-step operations; The main loop, within each brick button, takes care of all specific operation of Timmyton behavior.
The second thread is used for interruptions purpose of the main loop called Mode Loop.
Both threads run in parallel.
As soon as you pressed the center brick button (ID=2) the loop named Mode Loop is interrupted and you are back to the menu graphic screen (below:)
Use this image to create your own menu: Tool > Image Editor
Go code according to your pace of learning and go test on hardware. That is, debug it! Watch. Learn. Do ;)
Thanks for joining us:) Until the next episode of Lego’s adventures o/
Stay tuned!
Troubleshooting
The bevel gear is not locked. Constantly the tail disconnects and we have to remove the brick to access and repair the differential; We have to find a way to get the bevel gear locked;
Bright colors are not recognized immediately by the color sensor; It is better to use papers instead of lego blocks and bricks;
If the mouth stays just closed the color sensor will probably read red (tooth) or another reflective color :/ white or blue; We would have to find a way to always finish the Hungry Mode with Timmyton mouths’ wide open; but how? you tell me….
The wires are too tight in the design; Fit them carefully;
The code is more laborious than difficult; Just understand the simplification above and you are ready to let your genius and creativity flow;)