<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="https://peda.net/:static/535/atom.xsl"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>EEZYbotARM</title>
<id>https://peda.net/id/2f08d534377</id>
<updated>2018-04-03T22:28:27+03:00</updated>
<link href="https://peda.net/id/2f08d534377:atom" rel="self" />
<link href="https://peda.net/eurajoki/peruskoulut/digitutor-toiminta/kjro/eezybotarm#top" rel="alternate" />
<logo>https://peda.net/:static/535/peda.net.logo.bg.svg</logo>
<rights type="html">&lt;div class=&quot;license&quot;&gt;Tämän sivun lisenssi &lt;a rel=&quot;license&quot; href=&quot;https://peda.net/info&quot;&gt;Peda.net-yleislisenssi&lt;/a&gt;&lt;/div&gt;&#10;</rights>

<entry>
<title>Kaivuri testi neljällä moottorilla</title>
<id>https://peda.net/id/91418d9059d</id>
<updated>2019-04-08T12:13:26+03:00</updated>
<link href="https://peda.net/eurajoki/peruskoulut/digitutor-toiminta/kjro/eezybotarm/ktnm#top" />
<content type="html">​&lt;pre&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#5e6d03&quot;--&gt;&lt;!--&amp;gt;--&gt;#include&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#434f54&quot;--&gt;&lt;!--&amp;gt;--&gt;&amp;lt;&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;b&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#d35400&quot;--&gt;&lt;!--&amp;gt;--&gt;Servo&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;/b&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#434f54&quot;--&gt;&lt;!--&amp;gt;--&gt;.&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;h&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#434f54&quot;--&gt;&lt;!--&amp;gt;--&gt;&amp;gt;&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#434f54&quot;--&gt;&lt;!--&amp;gt;--&gt;&amp;amp;#47;&amp;amp;#47;Servo library&lt;!--filtered end tag: &lt;/font&gt;--&gt;&#10;&#10;&#10;&lt;b&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#d35400&quot;--&gt;&lt;!--&amp;gt;--&gt;Servo&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;/b&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;servo_1&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;;&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#434f54&quot;--&gt;&lt;!--&amp;gt;--&gt;&amp;amp;#47;&amp;amp;#47;initialize a servo object for the connected servo&lt;!--filtered end tag: &lt;/font&gt;--&gt;&#10;&lt;b&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#d35400&quot;--&gt;&lt;!--&amp;gt;--&gt;Servo&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;/b&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;servo_2&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;;&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#434f54&quot;--&gt;&lt;!--&amp;gt;--&gt;&amp;amp;#47;&amp;amp;#47;initialize a servo object for the connected servo&lt;!--filtered end tag: &lt;/font&gt;--&gt;&#10;&lt;b&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#d35400&quot;--&gt;&lt;!--&amp;gt;--&gt;Servo&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;/b&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;servo_3&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;;&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#434f54&quot;--&gt;&lt;!--&amp;gt;--&gt;&amp;amp;#47;&amp;amp;#47;initialize a servo object for the connected servo&lt;!--filtered end tag: &lt;/font&gt;--&gt;&#10;&lt;b&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#d35400&quot;--&gt;&lt;!--&amp;gt;--&gt;Servo&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;/b&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;servo_4&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;;&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#434f54&quot;--&gt;&lt;!--&amp;gt;--&gt;&amp;amp;#47;&amp;amp;#47;initialize a servo object for the connected servo&lt;!--filtered end tag: &lt;/font&gt;--&gt;&#10;&#10;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#00979c&quot;--&gt;&lt;!--&amp;gt;--&gt;int&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;angle1&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#434f54&quot;--&gt;&lt;!--&amp;gt;--&gt;=&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;0&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;;&lt;!--filtered end tag: &lt;/font&gt;--&gt;&#10;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#00979c&quot;--&gt;&lt;!--&amp;gt;--&gt;int&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;angle2&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#434f54&quot;--&gt;&lt;!--&amp;gt;--&gt;=&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;0&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;;&lt;!--filtered end tag: &lt;/font&gt;--&gt;&#10;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#00979c&quot;--&gt;&lt;!--&amp;gt;--&gt;int&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;angle3&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#434f54&quot;--&gt;&lt;!--&amp;gt;--&gt;=&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;0&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;;&lt;!--filtered end tag: &lt;/font&gt;--&gt;&#10;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#00979c&quot;--&gt;&lt;!--&amp;gt;--&gt;int&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;angle4&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#434f54&quot;--&gt;&lt;!--&amp;gt;--&gt;=&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;0&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;;&lt;!--filtered end tag: &lt;/font&gt;--&gt;&#10;&#10;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#00979c&quot;--&gt;&lt;!--&amp;gt;--&gt;int&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;potentio1&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#434f54&quot;--&gt;&lt;!--&amp;gt;--&gt;=&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;A1&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;;&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#434f54&quot;--&gt;&lt;!--&amp;gt;--&gt;&amp;amp;#47;&amp;amp;#47; initialize the A0analog pin for potentiometer&lt;!--filtered end tag: &lt;/font&gt;--&gt;&#10;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#00979c&quot;--&gt;&lt;!--&amp;gt;--&gt;int&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;potentio2&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#434f54&quot;--&gt;&lt;!--&amp;gt;--&gt;=&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;A0&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;;&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#434f54&quot;--&gt;&lt;!--&amp;gt;--&gt;&amp;amp;#47;&amp;amp;#47; initialize the A1analog pin for potentiometer&lt;!--filtered end tag: &lt;/font&gt;--&gt;&#10;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#00979c&quot;--&gt;&lt;!--&amp;gt;--&gt;int&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;potentio3&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#434f54&quot;--&gt;&lt;!--&amp;gt;--&gt;=&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;A2&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;;&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#434f54&quot;--&gt;&lt;!--&amp;gt;--&gt;&amp;amp;#47;&amp;amp;#47; initialize the A1analog pin for potentiometer&lt;!--filtered end tag: &lt;/font&gt;--&gt;&#10;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#00979c&quot;--&gt;&lt;!--&amp;gt;--&gt;int&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;potentio4&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#434f54&quot;--&gt;&lt;!--&amp;gt;--&gt;=&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;A3&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;;&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#434f54&quot;--&gt;&lt;!--&amp;gt;--&gt;&amp;amp;#47;&amp;amp;#47; initialize the A1analog pin for potentiometer&lt;!--filtered end tag: &lt;/font&gt;--&gt;&#10;&#10;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#5e6d03&quot;--&gt;&lt;!--&amp;gt;--&gt;#define&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;SERVO1PIN&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;7&lt;!--filtered end tag: &lt;/font&gt;--&gt;&#10;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#5e6d03&quot;--&gt;&lt;!--&amp;gt;--&gt;#define&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;SERVO2PIN&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;9&lt;!--filtered end tag: &lt;/font&gt;--&gt;&#10;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#5e6d03&quot;--&gt;&lt;!--&amp;gt;--&gt;#define&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;SERVO3PIN&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;10&lt;!--filtered end tag: &lt;/font&gt;--&gt;&#10;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#5e6d03&quot;--&gt;&lt;!--&amp;gt;--&gt;#define&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;SERVO4PIN&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;6&lt;!--filtered end tag: &lt;/font&gt;--&gt;&#10;&#10;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#00979c&quot;--&gt;&lt;!--&amp;gt;--&gt;void&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#5e6d03&quot;--&gt;&lt;!--&amp;gt;--&gt;setup&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;(&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;)&lt;!--filtered end tag: &lt;/font&gt;--&gt;&#10;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;{&lt;!--filtered end tag: &lt;/font&gt;--&gt;&#10;  &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;servo_1&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#434f54&quot;--&gt;&lt;!--&amp;gt;--&gt;.&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#d35400&quot;--&gt;&lt;!--&amp;gt;--&gt;attach&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;(&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;SERVO1PIN&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;)&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;;&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#434f54&quot;--&gt;&lt;!--&amp;gt;--&gt;&amp;amp;#47;&amp;amp;#47; attach the signal pin of servo to pin9 of arduino&lt;!--filtered end tag: &lt;/font&gt;--&gt;&#10;&#10;  &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;servo_2&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#434f54&quot;--&gt;&lt;!--&amp;gt;--&gt;.&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#d35400&quot;--&gt;&lt;!--&amp;gt;--&gt;attach&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;(&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;SERVO2PIN&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;)&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;;&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#434f54&quot;--&gt;&lt;!--&amp;gt;--&gt;&amp;amp;#47;&amp;amp;#47; attach the signal pin of servo to pin9 of arduino&lt;!--filtered end tag: &lt;/font&gt;--&gt;&#10;  &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;servo_3&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#434f54&quot;--&gt;&lt;!--&amp;gt;--&gt;.&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#d35400&quot;--&gt;&lt;!--&amp;gt;--&gt;attach&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;(&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;SERVO3PIN&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;)&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;;&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#434f54&quot;--&gt;&lt;!--&amp;gt;--&gt;&amp;amp;#47;&amp;amp;#47; attach the signal pin of servo to pin9 of arduino&lt;!--filtered end tag: &lt;/font&gt;--&gt;&#10;  &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;servo_4&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#434f54&quot;--&gt;&lt;!--&amp;gt;--&gt;.&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#d35400&quot;--&gt;&lt;!--&amp;gt;--&gt;attach&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;(&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;SERVO4PIN&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;)&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;;&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#434f54&quot;--&gt;&lt;!--&amp;gt;--&gt;&amp;amp;#47;&amp;amp;#47; attach the signal pin of servo to pin9 of arduino&lt;!--filtered end tag: &lt;/font&gt;--&gt;&#10;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;}&lt;!--filtered end tag: &lt;/font&gt;--&gt;&#10;&#10;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#00979c&quot;--&gt;&lt;!--&amp;gt;--&gt;void&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#5e6d03&quot;--&gt;&lt;!--&amp;gt;--&gt;loop&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;(&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;)&lt;!--filtered end tag: &lt;/font&gt;--&gt;&#10;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;{&lt;!--filtered end tag: &lt;/font&gt;--&gt;&#10;  &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;angle1&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#434f54&quot;--&gt;&lt;!--&amp;gt;--&gt;=&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#d35400&quot;--&gt;&lt;!--&amp;gt;--&gt;analogRead&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;(&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;potentio1&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;)&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;;&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#434f54&quot;--&gt;&lt;!--&amp;gt;--&gt;&amp;amp;#47;&amp;amp;#47; reading the potentiometer value between 0 and 1023&lt;!--filtered end tag: &lt;/font&gt;--&gt;&#10;  &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;angle1&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#434f54&quot;--&gt;&lt;!--&amp;gt;--&gt;=&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#d35400&quot;--&gt;&lt;!--&amp;gt;--&gt;map&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;(&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;angle1&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#434f54&quot;--&gt;&lt;!--&amp;gt;--&gt;,&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;0&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#434f54&quot;--&gt;&lt;!--&amp;gt;--&gt;,&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;1023&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#434f54&quot;--&gt;&lt;!--&amp;gt;--&gt;,&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;60&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#434f54&quot;--&gt;&lt;!--&amp;gt;--&gt;,&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;140&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;)&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;;&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#434f54&quot;--&gt;&lt;!--&amp;gt;--&gt;&amp;amp;#47;&amp;amp;#47; scaling the potentiometer value to angle value for servo between 0 and 180)&lt;!--filtered end tag: &lt;/font&gt;--&gt;&#10;  &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;servo_1&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#434f54&quot;--&gt;&lt;!--&amp;gt;--&gt;.&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#d35400&quot;--&gt;&lt;!--&amp;gt;--&gt;write&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;(&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;angle1&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;)&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;;&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#434f54&quot;--&gt;&lt;!--&amp;gt;--&gt;&amp;amp;#47;&amp;amp;#47;command to rotate the servo to the specified angle&lt;!--filtered end tag: &lt;/font&gt;--&gt;&#10;  &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#d35400&quot;--&gt;&lt;!--&amp;gt;--&gt;delay&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;(&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;5&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;)&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;;&lt;!--filtered end tag: &lt;/font&gt;--&gt;&#10;&#10;  &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;angle2&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#434f54&quot;--&gt;&lt;!--&amp;gt;--&gt;=&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#d35400&quot;--&gt;&lt;!--&amp;gt;--&gt;analogRead&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;(&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;potentio2&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;)&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;;&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#434f54&quot;--&gt;&lt;!--&amp;gt;--&gt;&amp;amp;#47;&amp;amp;#47; reading the potentiometer value between 0 and 1023&lt;!--filtered end tag: &lt;/font&gt;--&gt;&#10;  &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;angle2&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#434f54&quot;--&gt;&lt;!--&amp;gt;--&gt;=&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#d35400&quot;--&gt;&lt;!--&amp;gt;--&gt;map&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;(&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;angle2&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#434f54&quot;--&gt;&lt;!--&amp;gt;--&gt;,&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;0&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#434f54&quot;--&gt;&lt;!--&amp;gt;--&gt;,&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;1023&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#434f54&quot;--&gt;&lt;!--&amp;gt;--&gt;,&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;0&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#434f54&quot;--&gt;&lt;!--&amp;gt;--&gt;,&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;179&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;)&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;;&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#434f54&quot;--&gt;&lt;!--&amp;gt;--&gt;&amp;amp;#47;&amp;amp;#47; scaling the potentiometer value to angle value for servo between 0 and 180)&lt;!--filtered end tag: &lt;/font&gt;--&gt;&#10;  &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;servo_2&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#434f54&quot;--&gt;&lt;!--&amp;gt;--&gt;.&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#d35400&quot;--&gt;&lt;!--&amp;gt;--&gt;write&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;(&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;angle2&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;)&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;;&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#434f54&quot;--&gt;&lt;!--&amp;gt;--&gt;&amp;amp;#47;&amp;amp;#47;command to rotate the servo to the specified angle&lt;!--filtered end tag: &lt;/font&gt;--&gt;&#10;  &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#d35400&quot;--&gt;&lt;!--&amp;gt;--&gt;delay&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;(&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;5&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;)&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;;&lt;!--filtered end tag: &lt;/font&gt;--&gt;&#10;  &#10;  &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;angle3&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#434f54&quot;--&gt;&lt;!--&amp;gt;--&gt;=&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#d35400&quot;--&gt;&lt;!--&amp;gt;--&gt;analogRead&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;(&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;potentio3&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;)&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;;&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#434f54&quot;--&gt;&lt;!--&amp;gt;--&gt;&amp;amp;#47;&amp;amp;#47; reading the potentiometer value between 0 and 1023&lt;!--filtered end tag: &lt;/font&gt;--&gt;&#10;  &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;angle3&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#434f54&quot;--&gt;&lt;!--&amp;gt;--&gt;=&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#d35400&quot;--&gt;&lt;!--&amp;gt;--&gt;map&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;(&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;angle3&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#434f54&quot;--&gt;&lt;!--&amp;gt;--&gt;,&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;0&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#434f54&quot;--&gt;&lt;!--&amp;gt;--&gt;,&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;1023&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#434f54&quot;--&gt;&lt;!--&amp;gt;--&gt;,&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;30&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#434f54&quot;--&gt;&lt;!--&amp;gt;--&gt;,&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;160&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;)&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;;&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#434f54&quot;--&gt;&lt;!--&amp;gt;--&gt;&amp;amp;#47;&amp;amp;#47; scaling the potentiometer value to angle value for servo between 0 and 180)&lt;!--filtered end tag: &lt;/font&gt;--&gt;&#10;  &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;servo_3&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#434f54&quot;--&gt;&lt;!--&amp;gt;--&gt;.&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#d35400&quot;--&gt;&lt;!--&amp;gt;--&gt;write&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;(&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;angle3&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;)&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;;&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#434f54&quot;--&gt;&lt;!--&amp;gt;--&gt;&amp;amp;#47;&amp;amp;#47;command to rotate the servo to the specified angle&lt;!--filtered end tag: &lt;/font&gt;--&gt;&#10;  &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#d35400&quot;--&gt;&lt;!--&amp;gt;--&gt;delay&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;(&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;5&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;)&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;;&lt;!--filtered end tag: &lt;/font&gt;--&gt;&#10;&#10;  &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;angle4&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#434f54&quot;--&gt;&lt;!--&amp;gt;--&gt;=&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#d35400&quot;--&gt;&lt;!--&amp;gt;--&gt;analogRead&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;(&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;potentio4&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;)&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;;&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#434f54&quot;--&gt;&lt;!--&amp;gt;--&gt;&amp;amp;#47;&amp;amp;#47; reading the potentiometer value between 0 and 1023&lt;!--filtered end tag: &lt;/font&gt;--&gt;&#10;  &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;angle4&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#434f54&quot;--&gt;&lt;!--&amp;gt;--&gt;=&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#d35400&quot;--&gt;&lt;!--&amp;gt;--&gt;map&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;(&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;angle4&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#434f54&quot;--&gt;&lt;!--&amp;gt;--&gt;,&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;0&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#434f54&quot;--&gt;&lt;!--&amp;gt;--&gt;,&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;1023&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#434f54&quot;--&gt;&lt;!--&amp;gt;--&gt;,&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;30&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#434f54&quot;--&gt;&lt;!--&amp;gt;--&gt;,&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;160&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;)&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;;&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#434f54&quot;--&gt;&lt;!--&amp;gt;--&gt;&amp;amp;#47;&amp;amp;#47; scaling the potentiometer value to angle value for servo between 0 and 180)&lt;!--filtered end tag: &lt;/font&gt;--&gt;&#10;  &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;servo_4&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#434f54&quot;--&gt;&lt;!--&amp;gt;--&gt;.&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#d35400&quot;--&gt;&lt;!--&amp;gt;--&gt;write&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;(&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;angle4&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;)&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;;&lt;!--filtered end tag: &lt;/font&gt;--&gt; &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#434f54&quot;--&gt;&lt;!--&amp;gt;--&gt;&amp;amp;#47;&amp;amp;#47;command to rotate the servo to the specified angle&lt;!--filtered end tag: &lt;/font&gt;--&gt;&#10;  &lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#d35400&quot;--&gt;&lt;!--&amp;gt;--&gt;delay&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;(&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;5&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;)&lt;!--filtered end tag: &lt;/font&gt;--&gt;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;;&lt;!--filtered end tag: &lt;/font&gt;--&gt;&#10;&#10;&lt;!--filtered tag: &lt;font--&gt;&lt;!--filtered attribute: color=&quot;#000000&quot;--&gt;&lt;!--&amp;gt;--&gt;}&lt;!--filtered end tag: &lt;/font&gt;--&gt;&#10;&#10;&lt;/pre&gt;​</content>
<published>2019-04-08T12:13:26+03:00</published>
</entry>

<entry>
<title>Oppiva robottikäsi</title>
<id>https://peda.net/id/de7fad48399</id>
<updated>2019-02-26T09:55:22+02:00</updated>
<link href="https://peda.net/eurajoki/peruskoulut/digitutor-toiminta/kjro/eezybotarm/oppiva-robottik%C3%A4si#top" />
<content type="html">&lt;p&gt;&lt;span&gt;// Code written by Ryan Chan; it is pretty inefficient, but gets the job // done, I challenge you to make it more efficient!&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;//*IMPORTANT CHANGES IN VERSION 2: LEDs 4 and 5 have been moved to pins // 7 and 8 respectively; Buttons 1 and 2 have been moved to pins 12 and // 13 respectively. This is to make wiring easier.&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;#include &amp;lt;Servo.h&amp;gt;&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;Servo&lt;/span&gt;&lt;span&gt; servo1; &lt;/span&gt;&lt;span&gt;//Servos&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;Servo&lt;/span&gt;&lt;span&gt; servo2;&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;Servo&lt;/span&gt;&lt;span&gt; servo3;&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;const&lt;/span&gt; &lt;span&gt;int&lt;/span&gt;&lt;span&gt; LED1 = &lt;/span&gt;&lt;span&gt;2&lt;/span&gt;&lt;span&gt;; &lt;/span&gt;&lt;span&gt;//LEDs&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;const&lt;/span&gt; &lt;span&gt;int&lt;/span&gt;&lt;span&gt; LED2 = &lt;/span&gt;&lt;span&gt;3&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;const&lt;/span&gt; &lt;span&gt;int&lt;/span&gt;&lt;span&gt; LED3 = &lt;/span&gt;&lt;span&gt;4&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;const&lt;/span&gt; &lt;span&gt;int&lt;/span&gt;&lt;span&gt; LED4 = &lt;/span&gt;&lt;span&gt;7&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;const&lt;/span&gt; &lt;span&gt;int&lt;/span&gt;&lt;span&gt; LED5 = &lt;/span&gt;&lt;span&gt;8&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;const&lt;/span&gt; &lt;span&gt;int&lt;/span&gt;&lt;span&gt; button1 = &lt;/span&gt;&lt;span&gt;12&lt;/span&gt;&lt;span&gt;; &lt;/span&gt;&lt;span&gt;//Buttons&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;const&lt;/span&gt; &lt;span&gt;int&lt;/span&gt;&lt;span&gt; button2 = &lt;/span&gt;&lt;span&gt;13&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;int&lt;/span&gt;&lt;span&gt; button1Presses = &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt;; &lt;/span&gt;&lt;span&gt;//Button values&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;boolean&lt;/span&gt;&lt;span&gt; button2Pressed = false;&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;const&lt;/span&gt; &lt;span&gt;int&lt;/span&gt;&lt;span&gt; pot1 = A0; &lt;/span&gt;&lt;span&gt;//Potentimeters&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;const&lt;/span&gt; &lt;span&gt;int&lt;/span&gt;&lt;span&gt; pot2 = A1; &lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;const&lt;/span&gt; &lt;span&gt;int&lt;/span&gt;&lt;span&gt; pot3 = A2;&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;int&lt;/span&gt;&lt;span&gt; pot1Val; &lt;/span&gt;&lt;span&gt;//Potentimeter values&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;int&lt;/span&gt;&lt;span&gt; pot2Val;&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;int&lt;/span&gt;&lt;span&gt; pot3Val;&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;int&lt;/span&gt;&lt;span&gt; pot1Angle;&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;int&lt;/span&gt;&lt;span&gt; pot2Angle;&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;int&lt;/span&gt;&lt;span&gt; pot3Angle;&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;int&lt;/span&gt;&lt;span&gt; servo1PosSaves[] = {&lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt;}; &lt;/span&gt;&lt;span&gt;//position saves&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;int&lt;/span&gt;&lt;span&gt; servo2PosSaves[] = {&lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt;};&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;int&lt;/span&gt;&lt;span&gt; servo3PosSaves[] = {&lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt;};&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;void&lt;/span&gt; &lt;span&gt;setup&lt;/span&gt;&lt;span&gt;() {&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;  servo1.&lt;/span&gt;&lt;span&gt;attach&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;7&lt;/span&gt;&lt;span&gt;); &lt;/span&gt;&lt;/p&gt;&#10;&lt;p&gt;&lt;span&gt;  // Set up everything and will run once; &lt;/span&gt;&lt;/p&gt;&#10;&lt;p&gt;&lt;span&gt;  // attach servos and define the pin modes&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;  servo2.&lt;/span&gt;&lt;span&gt;attach&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;8&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;  servo3.&lt;/span&gt;&lt;span&gt;attach&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;9&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;span&gt;pinMode&lt;/span&gt;&lt;span&gt;(LED1, &lt;/span&gt;&lt;span&gt;OUTPUT&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;span&gt;pinMode&lt;/span&gt;&lt;span&gt;(LED2, &lt;/span&gt;&lt;span&gt;OUTPUT&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;span&gt;pinMode&lt;/span&gt;&lt;span&gt;(LED3, &lt;/span&gt;&lt;span&gt;OUTPUT&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;span&gt;pinMode&lt;/span&gt;&lt;span&gt;(LED4, &lt;/span&gt;&lt;span&gt;OUTPUT&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;span&gt;pinMode&lt;/span&gt;&lt;span&gt;(LED5, &lt;/span&gt;&lt;span&gt;OUTPUT&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;span&gt;pinMode&lt;/span&gt;&lt;span&gt;(button1, &lt;/span&gt;&lt;span&gt;INPUT&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;span&gt;pinMode&lt;/span&gt;&lt;span&gt;(button2, &lt;/span&gt;&lt;span&gt;INPUT&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;span&gt;Serial&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;begin&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;9600&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;}&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;void&lt;/span&gt; &lt;span&gt;loop&lt;/span&gt;&lt;span&gt;() {&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;span&gt;// put your main code here, to run repeatedly: &lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;  pot1Val = &lt;/span&gt;&lt;span&gt;analogRead&lt;/span&gt;&lt;span&gt;(pot1); &lt;/span&gt;&lt;/p&gt;&#10;&lt;p&gt;&lt;span&gt;  // This will read the values from the potentimeters and store it...&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;  pot1Angle = &lt;/span&gt;&lt;span&gt;map&lt;/span&gt;&lt;span&gt;(pot1Val, &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;1023&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;179&lt;/span&gt;&lt;span&gt;); &lt;/span&gt;&lt;/p&gt;&#10;&lt;p&gt;&lt;span&gt;  // ... and this will map the values from the potentiometers to &lt;/span&gt;&lt;/p&gt;&#10;&lt;p&gt;&lt;span&gt;  // values the servos can use and store it for later use&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;  pot2Val = &lt;/span&gt;&lt;span&gt;analogRead&lt;/span&gt;&lt;span&gt;(pot2); &lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;  pot2Angle = &lt;/span&gt;&lt;span&gt;map&lt;/span&gt;&lt;span&gt;(pot2Val, &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;1023&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;179&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;  pot3Val = &lt;/span&gt;&lt;span&gt;analogRead&lt;/span&gt;&lt;span&gt;(pot3);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;  pot3Angle = &lt;/span&gt;&lt;span&gt;map&lt;/span&gt;&lt;span&gt;(pot3Val, &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;1023&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;179&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;  servo1.&lt;/span&gt;&lt;span&gt;write&lt;/span&gt;&lt;span&gt;(pot1Angle); &lt;/span&gt;&lt;/p&gt;&#10;&lt;p&gt;&lt;span&gt;  // These will make the servos move to the mapped angles&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;  servo2.&lt;/span&gt;&lt;span&gt;write&lt;/span&gt;&lt;span&gt;(pot2Angle);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;  servo3.&lt;/span&gt;&lt;span&gt;write&lt;/span&gt;&lt;span&gt;(pot3Angle);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;span&gt;if&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;digitalRead&lt;/span&gt;&lt;span&gt;(button1) == &lt;/span&gt;&lt;span&gt;HIGH&lt;/span&gt;&lt;span&gt;){ &lt;/span&gt;&lt;/p&gt;&#10;&lt;p&gt;&lt;span&gt;  // This will check how many times button1 is pressed and save&lt;/span&gt;&lt;/p&gt;&#10;&lt;p&gt;&lt;span&gt;  // the positions to an array depending on how many times it is&lt;/span&gt;&lt;/p&gt;&#10;&lt;p&gt;&lt;span&gt;  // pressed; switch/case works like a if statement&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;  button1Presses++;&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;span&gt;switch&lt;/span&gt;&lt;span&gt;(button1Presses){&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;span&gt;case&lt;/span&gt; &lt;span&gt;1&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;  servo1PosSaves[&lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt;] = pot1Angle;&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;  servo2PosSaves[&lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt;] = pot2Angle;&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;  servo3PosSaves[&lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt;] = pot3Angle;&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;span&gt;digitalWrite&lt;/span&gt;&lt;span&gt;(LED1, &lt;/span&gt;&lt;span&gt;HIGH&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;span&gt;Serial&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;println&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;&amp;quot;Pos 1 Saved&amp;quot;&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;span&gt;break&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;span&gt;case&lt;/span&gt; &lt;span&gt;2&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;  servo1PosSaves[&lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt;] = pot1Angle;&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;  servo2PosSaves[&lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt;] = pot2Angle;&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;  servo3PosSaves[&lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt;] = pot3Angle;&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;span&gt;digitalWrite&lt;/span&gt;&lt;span&gt;(LED2, &lt;/span&gt;&lt;span&gt;HIGH&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;span&gt;Serial&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;println&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;&amp;quot;Pos 2 Saved&amp;quot;&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;span&gt;break&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;span&gt;case&lt;/span&gt; &lt;span&gt;3&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;  servo1PosSaves[&lt;/span&gt;&lt;span&gt;2&lt;/span&gt;&lt;span&gt;] = pot1Angle;&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;  servo2PosSaves[&lt;/span&gt;&lt;span&gt;2&lt;/span&gt;&lt;span&gt;] = pot2Angle;&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;  servo3PosSaves[&lt;/span&gt;&lt;span&gt;2&lt;/span&gt;&lt;span&gt;] = pot3Angle;&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;span&gt;digitalWrite&lt;/span&gt;&lt;span&gt;(LED3, &lt;/span&gt;&lt;span&gt;HIGH&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;span&gt;Serial&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;println&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;&amp;quot;Pos 3 Saved&amp;quot;&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;span&gt;break&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;span&gt;case&lt;/span&gt; &lt;span&gt;4&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;  servo1PosSaves[&lt;/span&gt;&lt;span&gt;3&lt;/span&gt;&lt;span&gt;] = pot1Angle;&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;  servo2PosSaves[&lt;/span&gt;&lt;span&gt;3&lt;/span&gt;&lt;span&gt;] = pot2Angle;&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;  servo3PosSaves[&lt;/span&gt;&lt;span&gt;3&lt;/span&gt;&lt;span&gt;] = pot3Angle;&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;span&gt;digitalWrite&lt;/span&gt;&lt;span&gt;(LED4, &lt;/span&gt;&lt;span&gt;HIGH&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;span&gt;Serial&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;println&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;&amp;quot;Pos 4 Saved&amp;quot;&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;span&gt;break&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;span&gt;case&lt;/span&gt; &lt;span&gt;5&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;  servo1PosSaves[&lt;/span&gt;&lt;span&gt;4&lt;/span&gt;&lt;span&gt;] = pot1Angle;&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;  servo2PosSaves[&lt;/span&gt;&lt;span&gt;4&lt;/span&gt;&lt;span&gt;] = pot2Angle;&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;  servo3PosSaves[&lt;/span&gt;&lt;span&gt;4&lt;/span&gt;&lt;span&gt;] = pot3Angle;&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;span&gt;digitalWrite&lt;/span&gt;&lt;span&gt;(LED5, &lt;/span&gt;&lt;span&gt;HIGH&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;span&gt;Serial&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;println&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;&amp;quot;Pos 5 Saved&amp;quot;&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;span&gt;break&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;  }&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;  }&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;span&gt;if&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;digitalRead&lt;/span&gt;&lt;span&gt;(button2) == &lt;/span&gt;&lt;span&gt;HIGH&lt;/span&gt;&lt;span&gt;){ &lt;/span&gt;&lt;/p&gt;&#10;&lt;p&gt;&lt;span&gt;  // Pretty self-explnatory here&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;  button2Pressed = true;  &lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;  }&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;span&gt;if&lt;/span&gt;&lt;span&gt;(button2Pressed){ &lt;/span&gt;&lt;/p&gt;&#10;&lt;p&gt;&lt;span&gt;  // if the boolean button2Press is true, then the servos &lt;/span&gt;&lt;/p&gt;&#10;&lt;strong&gt;&lt;span&gt;  // will run though all their saved positions&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;span&gt;for&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;int&lt;/span&gt;&lt;span&gt; i = &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt;; i &amp;lt; &lt;/span&gt;&lt;span&gt;5&lt;/span&gt;&lt;span&gt;; i++){&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;  servo1.&lt;/span&gt;&lt;span&gt;write&lt;/span&gt;&lt;span&gt;(servo1PosSaves[i]);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;  servo2.&lt;/span&gt;&lt;span&gt;write&lt;/span&gt;&lt;span&gt;(servo2PosSaves[i]);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;  servo3.&lt;/span&gt;&lt;span&gt;write&lt;/span&gt;&lt;span&gt;(servo3PosSaves[i]);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;span&gt;Serial&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;println&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;&amp;quot; potentimeter Angles: &amp;quot;&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;span&gt;Serial&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;println&lt;/span&gt;&lt;span&gt;(servo1PosSaves[i]);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;span&gt;Serial&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;println&lt;/span&gt;&lt;span&gt;(servo2PosSaves[i]);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;span&gt;Serial&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;println&lt;/span&gt;&lt;span&gt;(servo3PosSaves[i]);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;span&gt;delay&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;1050&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;  }&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;  }&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;span&gt;delay&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;300&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;}&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;/strong&gt;</content>
<published>2019-02-26T09:55:22+02:00</published>
</entry>

<entry>
<title>Joystick Sensor Serial Read</title>
<id>https://peda.net/id/ad09017c373</id>
<updated>2019-02-23T08:45:58+02:00</updated>
<link href="https://peda.net/eurajoki/peruskoulut/digitutor-toiminta/kjro/eezybotarm/jssr#top" />
<content type="html">&lt;span&gt;/*&lt;br/&gt;&#10; TNG Robotics | &lt;a href=&quot;http://www.tngrobotics.ca&quot; rel=&quot;nofollow ugc noopener&quot;&gt;www.tngrobotics.ca&lt;/a&gt;&lt;br/&gt;&#10; Title  | Joystick Sensor Serial Read&lt;br/&gt;&#10; Connect  | Servo to Arduino digital pin 5&lt;br/&gt;&#10; Published  | October 29, 2016&lt;br/&gt;&#10;*/&lt;/span&gt;&lt;br/&gt;&#10;&lt;br/&gt;&#10;&lt;span&gt;const&lt;/span&gt;&lt;span&gt;&lt;span&gt; &lt;/span&gt;&lt;/span&gt;&lt;span&gt;int&lt;/span&gt;&lt;span&gt;&lt;span&gt; &lt;/span&gt;VRx =&lt;span&gt; &lt;/span&gt;&lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt;;&lt;span&gt; &lt;/span&gt;&lt;/span&gt;&lt;span&gt;// Connect to Analog Pin 0&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;const&lt;/span&gt;&lt;span&gt;&lt;span&gt; &lt;/span&gt;&lt;/span&gt;&lt;span&gt;int&lt;/span&gt;&lt;span&gt;&lt;span&gt; &lt;/span&gt;VRy =&lt;span&gt; &lt;/span&gt;&lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt;;&lt;span&gt; &lt;/span&gt;&lt;/span&gt;&lt;span&gt;// Connect to Analog Pin 1&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;const&lt;/span&gt;&lt;span&gt;&lt;span&gt; &lt;/span&gt;&lt;/span&gt;&lt;span&gt;int&lt;/span&gt;&lt;span&gt;&lt;span&gt; &lt;/span&gt;SW =&lt;span&gt; &lt;/span&gt;&lt;/span&gt;&lt;span&gt;4&lt;/span&gt;&lt;span&gt;;&lt;span&gt; &lt;/span&gt;&lt;/span&gt;&lt;span&gt;// Connect to Digital Pin 4&lt;br/&gt;&#10;&lt;/span&gt;&lt;br/&gt;&#10;&lt;span&gt;void&lt;/span&gt;&lt;span&gt;&lt;span&gt; &lt;/span&gt;setup() {&lt;/span&gt;&lt;br/&gt;&#10;&lt;span&gt; pinMode(SW, INPUT);&lt;/span&gt;&lt;br/&gt;&#10;&lt;span&gt; digitalWrite(SW, HIGH);&lt;/span&gt;&lt;br/&gt;&#10;&lt;span&gt; Serial.&lt;/span&gt;&lt;span&gt;begin&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;9600&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;br/&gt;&#10;&lt;span&gt;}&lt;/span&gt;&lt;br/&gt;&#10;&lt;br/&gt;&#10;&lt;span&gt;void&lt;/span&gt;&lt;span&gt;&lt;span&gt; &lt;/span&gt;loop() {&lt;/span&gt;&lt;br/&gt;&#10;&lt;span&gt; Serial.&lt;/span&gt;&lt;span&gt;print&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;&amp;quot;x-axis tilt: &amp;quot;&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;br/&gt;&#10;&lt;span&gt; Serial.&lt;/span&gt;&lt;span&gt;println&lt;/span&gt;&lt;span&gt;(analogRead(VRx));&lt;/span&gt;&lt;br/&gt;&#10;&lt;span&gt; Serial.&lt;/span&gt;&lt;span&gt;print&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;&amp;quot;y-axis tilt: &amp;quot;&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;br/&gt;&#10;&lt;span&gt; Serial.&lt;/span&gt;&lt;span&gt;println&lt;/span&gt;&lt;span&gt;(analogRead(VRy));&lt;/span&gt;&lt;br/&gt;&#10;&lt;span&gt; Serial.&lt;/span&gt;&lt;span&gt;print&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;&amp;quot;switch: &amp;quot;&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;br/&gt;&#10;&lt;span&gt; Serial.&lt;/span&gt;&lt;span&gt;println&lt;/span&gt;&lt;span&gt;(digitalRead(SW));&lt;/span&gt;&lt;br/&gt;&#10;&lt;span&gt; delay(&lt;/span&gt;&lt;span&gt;800&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;br/&gt;&#10;&lt;span&gt;}&lt;/span&gt;</content>
<published>2019-02-23T08:45:58+02:00</published>
</entry>

<entry>
<title>Testing the DC Motors 2</title>
<id>https://peda.net/id/dbd37678291</id>
<updated>2019-02-05T09:22:56+02:00</updated>
<link href="https://peda.net/eurajoki/peruskoulut/digitutor-toiminta/kjro/eezybotarm/ttdm2#top" />
<content type="html">&lt;p&gt;&lt;span&gt;/**&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;* Bruno Santos, 2013&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;* feiticeir0@whatgeek.com.pt&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;* Small code to test DC motors - 2x with a L298 Dual H-Bridge Motor Driver&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;* Free to share&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;**/&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;//Testing the DC Motors&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;//Define Pins&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;//Motor A&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;int&lt;/span&gt;&lt;span&gt; enableA = &lt;/span&gt;&lt;span&gt;10&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;int&lt;/span&gt;&lt;span&gt; pinA1 = &lt;/span&gt;&lt;span&gt;2&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;int&lt;/span&gt;&lt;span&gt; pinA2 = &lt;/span&gt;&lt;span&gt;3&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;//Motor B&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;int&lt;/span&gt;&lt;span&gt; enableB = &lt;/span&gt;&lt;span&gt;9&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;int&lt;/span&gt;&lt;span&gt; pinB1 = &lt;/span&gt;&lt;span&gt;4&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;int&lt;/span&gt;&lt;span&gt; pinB2 = &lt;/span&gt;&lt;span&gt;5&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;br/&gt;&#10;&lt;/span&gt;&lt;/p&gt;&#10;&lt;p&gt;&lt;span&gt;//define time for run&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;// in milliseconds&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;int&lt;/span&gt; &lt;span&gt;running&lt;/span&gt;&lt;span&gt; = &lt;/span&gt;&lt;span&gt;10000&lt;/span&gt;&lt;span&gt;; &lt;/span&gt;&lt;span&gt;//10 secons&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;br/&gt;&#10;&lt;/span&gt;&lt;/p&gt;&#10;&lt;p&gt;&lt;span&gt;boolean&lt;/span&gt;&lt;span&gt; play;&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;br/&gt;&#10;&lt;/span&gt;&lt;/p&gt;&#10;&lt;p&gt;&lt;span&gt;void&lt;/span&gt; &lt;span&gt;setup&lt;/span&gt;&lt;span&gt;() {&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;Serial&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;begin&lt;/span&gt;&lt;span&gt; (&lt;/span&gt;&lt;span&gt;9600&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;//configure pin modes&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;pinMode&lt;/span&gt;&lt;span&gt; (enableA, &lt;/span&gt;&lt;span&gt;OUTPUT&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;pinMode&lt;/span&gt;&lt;span&gt; (pinA1, &lt;/span&gt;&lt;span&gt;OUTPUT&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;pinMode&lt;/span&gt;&lt;span&gt; (pinA2, &lt;/span&gt;&lt;span&gt;OUTPUT&lt;/span&gt;&lt;span&gt;); &lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;pinMode&lt;/span&gt;&lt;span&gt; (enableB, &lt;/span&gt;&lt;span&gt;OUTPUT&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;pinMode&lt;/span&gt;&lt;span&gt; (pinB1, &lt;/span&gt;&lt;span&gt;OUTPUT&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;pinMode&lt;/span&gt;&lt;span&gt; (pinB2, &lt;/span&gt;&lt;span&gt;OUTPUT&lt;/span&gt;&lt;span&gt;); &lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt; play = true;&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;}&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;br/&gt;&#10;&lt;/span&gt;&lt;/p&gt;&#10;&lt;strong&gt;&lt;span&gt;//Defining functions so it's more easy&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;//motor functions&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;void&lt;/span&gt;&lt;span&gt; motorAforward() {&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;digitalWrite&lt;/span&gt;&lt;span&gt; (pinA1, &lt;/span&gt;&lt;span&gt;HIGH&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;digitalWrite&lt;/span&gt;&lt;span&gt; (pinA2, &lt;/span&gt;&lt;span&gt;LOW&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;}&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;void&lt;/span&gt;&lt;span&gt; motorBforward() {&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;digitalWrite&lt;/span&gt;&lt;span&gt; (pinB1, &lt;/span&gt;&lt;span&gt;LOW&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;digitalWrite&lt;/span&gt;&lt;span&gt; (pinB2, &lt;/span&gt;&lt;span&gt;HIGH&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;}&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;void&lt;/span&gt;&lt;span&gt; motorAbackward() {&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;digitalWrite&lt;/span&gt;&lt;span&gt; (pinA1, &lt;/span&gt;&lt;span&gt;LOW&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;digitalWrite&lt;/span&gt;&lt;span&gt; (pinA2, &lt;/span&gt;&lt;span&gt;HIGH&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;}&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;void&lt;/span&gt;&lt;span&gt; motorBbackward() {&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;digitalWrite&lt;/span&gt;&lt;span&gt; (pinB1, &lt;/span&gt;&lt;span&gt;HIGH&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;digitalWrite&lt;/span&gt;&lt;span&gt; (pinB2, &lt;/span&gt;&lt;span&gt;LOW&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;}&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;void&lt;/span&gt;&lt;span&gt; motorAstop() {&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;digitalWrite&lt;/span&gt;&lt;span&gt; (pinA1, &lt;/span&gt;&lt;span&gt;HIGH&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;digitalWrite&lt;/span&gt;&lt;span&gt; (pinA2, &lt;/span&gt;&lt;span&gt;HIGH&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;}&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;void&lt;/span&gt;&lt;span&gt; motorBstop() {&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;digitalWrite&lt;/span&gt;&lt;span&gt; (pinB1, &lt;/span&gt;&lt;span&gt;HIGH&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;digitalWrite&lt;/span&gt;&lt;span&gt; (pinB2, &lt;/span&gt;&lt;span&gt;HIGH&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;}&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;void&lt;/span&gt;&lt;span&gt; motorAcoast() {&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;digitalWrite&lt;/span&gt;&lt;span&gt; (pinA1, &lt;/span&gt;&lt;span&gt;LOW&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;digitalWrite&lt;/span&gt;&lt;span&gt; (pinA2, &lt;/span&gt;&lt;span&gt;LOW&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;}&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;void&lt;/span&gt;&lt;span&gt; motorBcoast() {&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;digitalWrite&lt;/span&gt;&lt;span&gt; (pinB1, &lt;/span&gt;&lt;span&gt;LOW&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;digitalWrite&lt;/span&gt;&lt;span&gt; (pinB2, &lt;/span&gt;&lt;span&gt;LOW&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;}&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;void&lt;/span&gt;&lt;span&gt; motorAon() {&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;digitalWrite&lt;/span&gt;&lt;span&gt; (enableA, &lt;/span&gt;&lt;span&gt;HIGH&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;}&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;void&lt;/span&gt;&lt;span&gt; motorBon() {&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;digitalWrite&lt;/span&gt;&lt;span&gt; (enableB, &lt;/span&gt;&lt;span&gt;HIGH&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;}&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;void&lt;/span&gt;&lt;span&gt; motorAoff() {&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;digitalWrite&lt;/span&gt;&lt;span&gt; (enableA, &lt;/span&gt;&lt;span&gt;LOW&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;}&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;void&lt;/span&gt;&lt;span&gt; motorBoff() {&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;digitalWrite&lt;/span&gt;&lt;span&gt; (enableB, &lt;/span&gt;&lt;span&gt;LOW&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;}&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;// Movement functions&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;void&lt;/span&gt;&lt;span&gt; forward (&lt;/span&gt;&lt;span&gt;int&lt;/span&gt;&lt;span&gt; duration) {&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt; motorAforward();&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt; motorBforward();&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;delay&lt;/span&gt;&lt;span&gt; (duration);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;}&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;void&lt;/span&gt;&lt;span&gt; backward (&lt;/span&gt;&lt;span&gt;int&lt;/span&gt;&lt;span&gt; duration) {&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt; motorAbackward();&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt; motorBbackward();&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;delay&lt;/span&gt;&lt;span&gt; (duration);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;}&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;void&lt;/span&gt;&lt;span&gt; left (&lt;/span&gt;&lt;span&gt;int&lt;/span&gt;&lt;span&gt; duration) {&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt; motorAbackward();&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt; motorBforward();&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;delay&lt;/span&gt;&lt;span&gt; (duration);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;}&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;void&lt;/span&gt;&lt;span&gt; right (&lt;/span&gt;&lt;span&gt;int&lt;/span&gt;&lt;span&gt; duration) {&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt; motorAforward();&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt; motorBbackward();&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;delay&lt;/span&gt;&lt;span&gt; (duration);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;}&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;void&lt;/span&gt;&lt;span&gt; coast (&lt;/span&gt;&lt;span&gt;int&lt;/span&gt;&lt;span&gt; duration) {&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt; motorAcoast();&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt; motorBcoast();&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;delay&lt;/span&gt;&lt;span&gt; (duration);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;}&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;void&lt;/span&gt;&lt;span&gt; breakRobot (&lt;/span&gt;&lt;span&gt;int&lt;/span&gt;&lt;span&gt; duration) {&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt; motorAstop();&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt; motorBstop();&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;delay&lt;/span&gt;&lt;span&gt; (duration);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;}&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;void&lt;/span&gt;&lt;span&gt; disableMotors() {&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt; motorAoff();&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt; motorBoff();&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;}&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;void&lt;/span&gt;&lt;span&gt; enableMotors() {&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt; motorAon();&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt; motorBon();&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;}&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;void&lt;/span&gt; &lt;span&gt;loop&lt;/span&gt;&lt;span&gt;() {&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt; enableMotors();&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;while&lt;/span&gt;&lt;span&gt; (play) {&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;//Forward for 1,5s&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;Serial&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;println&lt;/span&gt;&lt;span&gt; (&lt;/span&gt;&lt;span&gt;&amp;quot;forward...&amp;quot;&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt; forward (&lt;/span&gt;&lt;span&gt;1500&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;//turn right&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;Serial&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;println&lt;/span&gt;&lt;span&gt; (&lt;/span&gt;&lt;span&gt;&amp;quot;right...&amp;quot;&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt; right (&lt;/span&gt;&lt;span&gt;500&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;//Forward for 1,5s&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;Serial&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;println&lt;/span&gt;&lt;span&gt; (&lt;/span&gt;&lt;span&gt;&amp;quot;forward...&amp;quot;&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt; forward (&lt;/span&gt;&lt;span&gt;1500&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;//turn left&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;Serial&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;println&lt;/span&gt;&lt;span&gt; (&lt;/span&gt;&lt;span&gt;&amp;quot;left...&amp;quot;&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt; left (&lt;/span&gt;&lt;span&gt;1000&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;//Forward for 1,5s&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;Serial&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;println&lt;/span&gt;&lt;span&gt; (&lt;/span&gt;&lt;span&gt;&amp;quot;forward...&amp;quot;&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt; forward (&lt;/span&gt;&lt;span&gt;1500&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;if&lt;/span&gt;&lt;span&gt; (&lt;/span&gt;&lt;span&gt;millis&lt;/span&gt;&lt;span&gt;() &amp;gt; &lt;/span&gt;&lt;span&gt;running&lt;/span&gt;&lt;span&gt;) {&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt; play = false;&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;Serial&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;println&lt;/span&gt;&lt;span&gt; (&lt;/span&gt;&lt;span&gt;&amp;quot;Falsing&amp;quot;&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt; }&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt; };&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;//disable motors&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt; disableMotors();&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;}&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;/strong&gt;</content>
<published>2019-02-05T09:22:56+02:00</published>
</entry>

<entry>
<title>Testing the DC Motors</title>
<id>https://peda.net/id/58d5c6d2291</id>
<updated>2019-02-05T09:12:07+02:00</updated>
<link href="https://peda.net/eurajoki/peruskoulut/digitutor-toiminta/kjro/eezybotarm/ttdm#top" />
<content type="html">&lt;strong&gt;&lt;span&gt;/**&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt; * Bruno Santos, 2013&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt; * feiticeir0@whatgeek.com.pt&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt; * Small code to test DC motors - 2x with a L298 Dual H-Bridge Motor Driver&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt; * Free to share&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt; **/&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;//Testing the DC Motors&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;//Define Pins&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;//Motor A&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;int&lt;/span&gt;&lt;span&gt; enableA = &lt;/span&gt;&lt;span&gt;10&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;int&lt;/span&gt;&lt;span&gt; pinA1 = &lt;/span&gt;&lt;span&gt;2&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;int&lt;/span&gt;&lt;span&gt; pinA2 = &lt;/span&gt;&lt;span&gt;3&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;//Motor B&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;int&lt;/span&gt;&lt;span&gt; enableB = &lt;/span&gt;&lt;span&gt;9&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;int&lt;/span&gt;&lt;span&gt; pinB1 = &lt;/span&gt;&lt;span&gt;4&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;int&lt;/span&gt;&lt;span&gt; pinB2 = &lt;/span&gt;&lt;span&gt;5&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;void&lt;/span&gt; &lt;span&gt;setup&lt;/span&gt;&lt;span&gt;() {&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;Serial&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;begin&lt;/span&gt;&lt;span&gt; (&lt;/span&gt;&lt;span&gt;9600&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;//configure pin modes&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;pinMode&lt;/span&gt;&lt;span&gt; (enableA, &lt;/span&gt;&lt;span&gt;OUTPUT&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;pinMode&lt;/span&gt;&lt;span&gt; (pinA1, &lt;/span&gt;&lt;span&gt;OUTPUT&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;pinMode&lt;/span&gt;&lt;span&gt; (pinA2, &lt;/span&gt;&lt;span&gt;OUTPUT&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;pinMode&lt;/span&gt;&lt;span&gt; (enableB, &lt;/span&gt;&lt;span&gt;OUTPUT&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;pinMode&lt;/span&gt;&lt;span&gt; (pinB1, &lt;/span&gt;&lt;span&gt;OUTPUT&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;pinMode&lt;/span&gt;&lt;span&gt; (pinB2, &lt;/span&gt;&lt;span&gt;OUTPUT&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;}&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;void&lt;/span&gt; &lt;span&gt;loop&lt;/span&gt;&lt;span&gt;() {&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;//enabling motor A&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;Serial&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;println&lt;/span&gt;&lt;span&gt; (&lt;/span&gt;&lt;span&gt;&amp;quot;Enabling Motor A&amp;quot;&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;digitalWrite&lt;/span&gt;&lt;span&gt; (enableA, &lt;/span&gt;&lt;span&gt;HIGH&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;//do something&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;//forward&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;Serial&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;println&lt;/span&gt;&lt;span&gt; (&lt;/span&gt;&lt;span&gt;&amp;quot;Forward&amp;quot;&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;digitalWrite&lt;/span&gt;&lt;span&gt; (pinA1, &lt;/span&gt;&lt;span&gt;HIGH&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;digitalWrite&lt;/span&gt;&lt;span&gt; (pinA2, &lt;/span&gt;&lt;span&gt;LOW&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;//5s forward&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;delay&lt;/span&gt;&lt;span&gt; (&lt;/span&gt;&lt;span&gt;5000&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;//reverse&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;digitalWrite&lt;/span&gt;&lt;span&gt; (pinA1,&lt;/span&gt;&lt;span&gt;LOW&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;digitalWrite&lt;/span&gt;&lt;span&gt; (pinA2,&lt;/span&gt;&lt;span&gt;HIGH&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;//5s backwards&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;delay&lt;/span&gt;&lt;span&gt; (&lt;/span&gt;&lt;span&gt;5000&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;//stop&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;digitalWrite&lt;/span&gt;&lt;span&gt; (enableA, &lt;/span&gt;&lt;span&gt;LOW&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;delay&lt;/span&gt;&lt;span&gt; (&lt;/span&gt;&lt;span&gt;5000&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;//enabling motor B&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;//Since motor B is mounted reversed, PINs must be exchanged&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;Serial&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;println&lt;/span&gt;&lt;span&gt; (&lt;/span&gt;&lt;span&gt;&amp;quot;Enabling Motor A&amp;quot;&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;digitalWrite&lt;/span&gt;&lt;span&gt; (enableB, &lt;/span&gt;&lt;span&gt;HIGH&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;//do something&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;//forward&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;Serial&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;println&lt;/span&gt;&lt;span&gt; (&lt;/span&gt;&lt;span&gt;&amp;quot;Forward&amp;quot;&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;digitalWrite&lt;/span&gt;&lt;span&gt; (pinB1, &lt;/span&gt;&lt;span&gt;LOW&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;digitalWrite&lt;/span&gt;&lt;span&gt; (pinB2, &lt;/span&gt;&lt;span&gt;HIGH&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;//5s forward&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;delay&lt;/span&gt;&lt;span&gt; (&lt;/span&gt;&lt;span&gt;5000&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;//reverse&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;digitalWrite&lt;/span&gt;&lt;span&gt; (pinB1,&lt;/span&gt;&lt;span&gt;HIGH&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;digitalWrite&lt;/span&gt;&lt;span&gt; (pinB2,&lt;/span&gt;&lt;span&gt;LOW&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;//5s backwards&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;delay&lt;/span&gt;&lt;span&gt; (&lt;/span&gt;&lt;span&gt;5000&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt;//stop&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;digitalWrite&lt;/span&gt;&lt;span&gt; (enableB, &lt;/span&gt;&lt;span&gt;LOW&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt; &lt;span&gt;delay&lt;/span&gt;&lt;span&gt; (&lt;/span&gt;&lt;span&gt;5000&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;span&gt;&lt;br/&gt;&#10;&lt;/span&gt;&lt;span&gt; }&lt;/span&gt;&lt;/strong&gt;</content>
<published>2019-02-05T09:12:07+02:00</published>
</entry>

<entry>
<title>Kaivuri testi 4.ino</title>
<id>https://peda.net/id/010aafa2288</id>
<updated>2019-02-04T16:34:39+02:00</updated>
<link href="https://peda.net/eurajoki/peruskoulut/digitutor-toiminta/kjro/eezybotarm/kaivuri-testi-4-ino#top" />
<content type="html">#include &amp;lt;Servo.h&amp;gt; //Servo library&lt;br/&gt;&#10; &lt;br/&gt;&#10; &lt;br/&gt;&#10; Servo servo_1; //initialize a servo object for the connected servo &lt;br/&gt;&#10; Servo servo_2; //initialize a servo object for the connected servo &lt;br/&gt;&#10; Servo servo_3; //initialize a servo object for the connected servo &lt;br/&gt;&#10;&lt;br/&gt;&#10; &lt;br/&gt;&#10; int angle1 = 0;&lt;br/&gt;&#10; int angle2 = 0;&lt;br/&gt;&#10; int angle3 = 0; &lt;br/&gt;&#10; int potentio1 = A1; // initialize the A0analog pin for potentiometer&lt;br/&gt;&#10; int potentio2 = A0; // initialize the A1analog pin for potentiometer&lt;br/&gt;&#10; int potentio3 = A2; // initialize the A1analog pin for potentiometer&lt;br/&gt;&#10; int potentio4 = A3; // initialize the A1analog pin for potentiometer&lt;br/&gt;&#10; #define SERVO1PIN 7&lt;br/&gt;&#10; #define SERVO2PIN 9&lt;br/&gt;&#10; #define SERVO3PIN 10&lt;br/&gt;&#10; &lt;br/&gt;&#10; void setup() &lt;br/&gt;&#10; { &lt;br/&gt;&#10; servo_1.attach(SERVO1PIN); // attach the signal pin of servo to pin9 of arduino&lt;br/&gt;&#10; &lt;br/&gt;&#10; servo_2.attach(SERVO2PIN); // attach the signal pin of servo to pin9 of arduino&lt;br/&gt;&#10; servo_3.attach(SERVO3PIN); // attach the signal pin of servo to pin9 of arduino&lt;br/&gt;&#10; } &lt;br/&gt;&#10; &lt;br/&gt;&#10; void loop() &lt;br/&gt;&#10; { &lt;br/&gt;&#10; angle1 = analogRead(potentio1); // reading the potentiometer value between 0 and 1023 &lt;br/&gt;&#10; angle1 = map(angle1, 0, 1023, 60, 140); // scaling the potentiometer value to angle value for servo between 0 and 180) &lt;br/&gt;&#10; servo_1.write(angle1); //command to rotate the servo to the specified angle &lt;br/&gt;&#10; delay(5);&lt;br/&gt;&#10; &lt;br/&gt;&#10; angle2 = analogRead(potentio2); // reading the potentiometer value between 0 and 1023 &lt;br/&gt;&#10; angle2 = map(angle2, 0, 1023, 0, 179); // scaling the potentiometer value to angle value for servo between 0 and 180) &lt;br/&gt;&#10; servo_2.write(angle2); //command to rotate the servo to the specified angle &lt;br/&gt;&#10; delay(5); &lt;br/&gt;&#10; angle3 = analogRead(potentio3); // reading the potentiometer value between 0 and 1023 &lt;br/&gt;&#10; angle3 = map(angle3, 0, 1023, 30, 160); // scaling the potentiometer value to angle value for servo between 0 and 180) &lt;br/&gt;&#10; servo_3.write(angle3); //command to rotate the servo to the specified angle &lt;br/&gt;&#10; delay(5);&lt;br/&gt;&#10; &lt;br/&gt;&#10; }</content>
<published>2019-02-04T16:34:39+02:00</published>
</entry>

<entry>
<title>EEZYbotARM</title>
<id>https://peda.net/id/e093a72a377</id>
<updated>2018-04-03T22:33:25+03:00</updated>
<link href="https://peda.net/eurajoki/peruskoulut/digitutor-toiminta/kjro/eezybotarm/eezybotarm#top" />
<content type="html">&lt;img class=&quot;&quot; src=&quot;http://www.eezyrobots.it/img/eba1/EBA0D.jpg&quot; alt=&quot;&quot;/&gt;&lt;img class=&quot;&quot; src=&quot;http://www.eezyrobots.it/eba_mk2.html#&quot; alt=&quot;&quot;/&gt;&lt;br/&gt;&#10;&lt;b&gt;EEZYbotARM mk1&lt;/b&gt;&lt;br/&gt;&#10;&lt;br/&gt;&#10;&lt;img class=&quot;&quot; src=&quot;http://www.eezyrobots.it/img/eba2/eba2step002.jpg&quot; alt=&quot;&quot;/&gt;&lt;br/&gt;&#10;&lt;b&gt;EEZYbotARM mk2&lt;/b&gt;&lt;br/&gt;&#10;&lt;br/&gt;&#10;</content>
<published>2018-04-03T22:33:25+03:00</published>
</entry>

<entry>
<title>Linkit</title>
<id>https://peda.net/id/3a818406377</id>
<updated>1970-01-01T02:00:00+02:00</updated>
<link href="https://peda.net/eurajoki/peruskoulut/digitutor-toiminta/kjro/eezybotarm/linkit#top" />
<content type="html">&lt;!--filtered tag: &lt;article--&gt;&lt;!--filtered attribute: id=&quot;uuid-895d0c6c-3775-11e8-8665-62f3624c9a50&quot;--&gt;&lt;!--filtered attribute: class=&quot;link document uuid-895d0c6c-3775-11e8-8665-62f3624c9a50 enclose&quot;--&gt;&lt;!--filtered attribute: data-id=&quot;895d0c6c-3775-11e8-8665-62f3624c9a50&quot;--&gt;&lt;!--filtered attribute: data-draft-type=&quot;published&quot;--&gt;&lt;!--&amp;gt;--&gt;&lt;!--filtered tag: &lt;header--&gt;&lt;!--&amp;gt;--&gt;&lt;h1&gt;&lt;!--filtered attribute: class=&quot;link&quot;--&gt;&lt;a href=&quot;http://www.eezyrobots.it/eba_mk2.html&quot; title=&quot;http://www.eezyrobots.it/eba_mk2.html (avautuu uuteen ikkunaan)&quot; target=&quot;_blank&quot; rel=&quot;nofollow ugc noopener&quot;&gt;EEZYbotARM mk2&lt;/a&gt;&lt;/h1&gt;&#10;&lt;!--filtered end tag: &lt;/header&gt;--&gt;&lt;div class=&quot;main&quot;&gt;&lt;div class=&quot;description&quot;&gt;EEZYbotARMin toinen versio. 3D tulostettava ja hieman haastavampi robottikäsi projekti.&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;!--filtered tag: &lt;footer--&gt;&lt;!--&amp;gt;--&gt;&lt;!--filtered end tag: &lt;/footer&gt;--&gt;&lt;!--filtered end tag: &lt;/article&gt;--&gt;&#10;&lt;!--filtered tag: &lt;article--&gt;&lt;!--filtered attribute: id=&quot;uuid-5eb0f014-3775-11e8-86a1-4631624c9a50&quot;--&gt;&lt;!--filtered attribute: class=&quot;link document uuid-5eb0f014-3775-11e8-86a1-4631624c9a50 enclose&quot;--&gt;&lt;!--filtered attribute: data-id=&quot;5eb0f014-3775-11e8-86a1-4631624c9a50&quot;--&gt;&lt;!--filtered attribute: data-draft-type=&quot;published&quot;--&gt;&lt;!--&amp;gt;--&gt;&lt;!--filtered tag: &lt;header--&gt;&lt;!--&amp;gt;--&gt;&lt;h1&gt;&lt;!--filtered attribute: class=&quot;link&quot;--&gt;&lt;a href=&quot;http://www.eezyrobots.it/eba_mk1.html&quot; title=&quot;http://www.eezyrobots.it/eba_mk1.html (avautuu uuteen ikkunaan)&quot; target=&quot;_blank&quot; rel=&quot;nofollow ugc noopener&quot;&gt;EEZYbotARM mk1&lt;/a&gt;&lt;/h1&gt;&#10;&lt;!--filtered end tag: &lt;/header&gt;--&gt;&lt;div class=&quot;main&quot;&gt;&lt;div class=&quot;description&quot;&gt;3d tulostettava robottikäsi. Tästä kannattaa aloittaa.&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;!--filtered tag: &lt;footer--&gt;&lt;!--&amp;gt;--&gt;&lt;!--filtered end tag: &lt;/footer&gt;--&gt;&lt;!--filtered end tag: &lt;/article&gt;--&gt;&#10;</content>
<published>2018-04-03T22:28:46+03:00</published>
</entry>


</feed>