<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Maryam's Fab Academy 2020</title>
    <description>This is the documentation of my Fabacademy process. All my weekly assignments will be published here as well as my final project.
</description>
    <link>http://localhost:4000/2020/labs/bahrain/students/maryam-ali/</link>
    <atom:link href="http://localhost:4000/2020/labs/bahrain/students/maryam-ali/feed.xml" rel="self" type="application/rss+xml"/>
    <pubDate>Sun, 29 Nov 2020 15:03:44 +0300</pubDate>
    <lastBuildDate>Sun, 29 Nov 2020 15:03:44 +0300</lastBuildDate>
    <generator>Jekyll v4.0.0</generator>
    
      <item>
        <title>19. Project Development</title>
        <description>&lt;p style=&quot;text-align: justify;&quot;&gt;
The aim of this week assignment is to summarise my final project plan and progress.
&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Assignment content:&lt;/strong&gt;&lt;/p&gt;

&lt;div id=&quot;toc_container&quot;&gt;
&lt;ul class=&quot;toc_list&quot;&gt;
&lt;li&gt;&lt;a href=&quot;#First_Point_Header&quot;&gt;19.1. What tasks have been completed, and what tasks remain?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#Second_Point_Header&quot;&gt;19.2. What has worked? what hasn't?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#Third_Point_Header&quot;&gt;19.3. What questions need to be resolved?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#Fourth_Point_Header&quot;&gt;19.4. What will happen when?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#Fifth_Point_Header&quot;&gt;19.5. What have you learned?&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;

&lt;hr /&gt;
&lt;h3 id=&quot;First_Point_Header&quot;&gt;19.1. What tasks have been completed, and what tasks remain?&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Completed Tasks:&lt;/strong&gt;&lt;/p&gt;

&lt;div id=&quot;toc_container&quot;&gt;
&lt;ul class=&quot;toc_list&quot;&gt;

&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;strong&gt;Micro-controller design:&lt;/strong&gt; I have designed, built, and used my own micro-controller board after three 
attempts. First attempt was using ATmega328P micro-contoller chip, second attempt was also using ATmega328P but with less components and different routing, 
while the third attempt was using ATtiny84A micro-contoller chip.&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;strong&gt;Output device:&lt;/strong&gt; I have added a mini vibrating motor to my project circuit as an inidcator output for 
the user when he/she reached the maximum allowed angle (140 degree).&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;strong&gt;Embeded programming:&lt;/strong&gt; I have programmed my circuit to take readings of Pitch (Y-axis) and Roll (X-axis) 
angles of two MPU6050 sensors and used them to calculate the knee angle of movement.&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;strong&gt;Communications:&lt;/strong&gt; First, I used &quot;HC-05&quot; bluetooth module to communicate the output data of my project 
to a mobile phone. Later, I decided to use on-board low energy bluetooth &quot;RN4871&quot; to save power and space.&lt;/p&gt;&lt;/li&gt;

&lt;/ul&gt;
&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Tasks Remain:&lt;/strong&gt;&lt;/p&gt;

&lt;div id=&quot;toc_container&quot;&gt;
&lt;ul class=&quot;toc_list&quot;&gt;

&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;strong&gt;User interface:&lt;/strong&gt; I'm planning to use MIT app inventor to design, program, and build my project interface.
&lt;/p&gt;&lt;/li&gt;

&lt;/ul&gt;
&lt;/div&gt;

&lt;hr /&gt;
&lt;h3 id=&quot;Second_Point_Header&quot;&gt;19.2. What has worked? what hasn't?&lt;/h3&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;
The milling wasn't made correctly first When I designed my micro-cotntoller board first using ATmega328P chip. 
The area of the milling was too small and the milling bit wasn't able to mill it. Later, I removed some of the 
unused pins and changed the MCU chip to a smaller one, which is ATtiny84A and it worked.
&lt;/p&gt;

&lt;hr /&gt;
&lt;h3 id=&quot;Third_Point_Header&quot;&gt;19.3. What questions need to be resolved?&lt;/h3&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;
The device need to be smaller in size to provide an easier movement for the user with less weight added. 
Also, there should be a wifi communication to transfer the range of movement readings over a shared channel to be reviewed by a therapist.
&lt;/p&gt;

&lt;hr /&gt;
&lt;h3 id=&quot;Fourth_Point_Header&quot;&gt;19.4. What will happen when?&lt;/h3&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;
After testing the results of range of movement readings, I'll sew the piece of fabric that I have printed my 3D design on and attach it to a 
knee sleeve.  
&lt;/p&gt;

&lt;hr /&gt;
&lt;h3 id=&quot;Fifth_Point_Header&quot;&gt;19.5. What have you learned?&lt;/h3&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;
I have learned that I should manage my time when working on a project and follow a defined plan from the beginning to save time and efforts. 
Also, I learned that it's very important to balance between the research work and the practical work. 
In addition, debugging skills and understanding your circit is very important when working with electronics to solve problems and find errors.
&lt;/p&gt;

&lt;hr /&gt;

</description>
        <pubDate>Wed, 03 Jun 2020 19:00:47 +0300</pubDate>
        <link>http://localhost:4000/2020/labs/bahrain/students/maryam-ali/posts/2020/06/03/week19.html</link>
        <guid isPermaLink="true">http://localhost:4000/2020/labs/bahrain/students/maryam-ali/posts/2020/06/03/week19.html</guid>
        
        <category>week 19</category>
        
        
        <category>posts</category>
        
      </item>
    
      <item>
        <title>18. Mechanical design, Machine design</title>
        <description>&lt;p style=&quot;text-align: justify;&quot;&gt;
In this week I have to work in a team to build a machine that includes mechanism, actuation, and automation. 
First, we have to build the mechanical parts and operate it manually. Then we have actuate and automate the machine we built.
&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Assignment content:&lt;/strong&gt;&lt;/p&gt;
&lt;div id=&quot;toc_container&quot;&gt;
&lt;ul class=&quot;toc_list&quot;&gt;
&lt;li&gt;&lt;a href=&quot;#First_Point_Header&quot;&gt;18.1. Project introduction. &lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#Second_Point_Header&quot;&gt;18.2. Bill of Materials. &lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#Third_Point_Header&quot;&gt;18.3. First try using Polograph. &lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#Fourth_Point_Header&quot;&gt;18.4. Second try using Makelangelo. &lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#Fifth_Point_Header&quot;&gt;18.5. Third try using Universal G-Code Sender. &lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#Sixth_Point_Header&quot;&gt;18.6. Fourth try using Grbl Controller. &lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Machines used:&lt;/strong&gt;&lt;/p&gt;
&lt;div id=&quot;toc_container&quot;&gt;
&lt;ul class=&quot;toc_list&quot;&gt;
&lt;li&gt;3D printer.&lt;/li&gt;
&lt;li&gt;Power supply.&lt;/li&gt;
&lt;li&gt;Digital multimeter.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Useful resources:&lt;/strong&gt;&lt;/p&gt;
&lt;div id=&quot;toc_container&quot;&gt;
&lt;ul class=&quot;toc_list&quot;&gt;
&lt;li&gt;&lt;a href=&quot;https://www.thingiverse.com/thing:3875761&quot;&gt;&lt;strong&gt;Thingiverse&lt;/strong&gt;, How to make a Vertical Drawing Robot. &lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.hackster.io/8bitsandabyte/the-plotti-botti-an-internet-controlled-drawing-robot-51225a&quot;&gt;&lt;strong&gt;hackster.io&lt;/strong&gt;, The Plotti Botti: An Internet-Controlled Drawing Robot.&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=Ai7_AvIYHZc&quot;&gt;Vertical plotter on Arduino.&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.instructables.com/id/XY-Plotter-Drawing-Robot-Arduino-Polargraph/&quot;&gt;XY Plotter Drawing Robot | Arduino | Polargraph.&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.zyltech.com/arduino-cnc-shield-instructions/&quot;&gt;Arduino Compatible CNC Shield Instructions.&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.instructables.com/id/3020-CNC-Arduino-GRBL-CNC-Shield-V3/&quot;&gt;3020 CNC + Arduino + GRBL + CNC Shield V3.&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;

&lt;hr /&gt;
&lt;h3 id=&quot;First_Point_Header&quot;&gt;18.1. Project introduction&lt;/h3&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;
My group project is a hanging drawing machine that moves its hand in two axes (X, Y). 
The hand conists of a pen attached to a 3D printed holder that connected to two stepper motors from the right and left sides. 
The machine should be attached vertically to a board and being controlled by a g-code. 
&lt;/p&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;
The aim of this machine is to enable the user to draw anything on a board or a wall. 
Requirements are simple as the user should just fix the machine on the panel want to draw on 
and enter the size of the drawing area and machine specifications.
&lt;/p&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;
In this page, I will document my individual contribution, which includes programming and interfacing. 
For full project documentation, refer to the &lt;a href=&quot;http://duaa.alaali.fabcloud.io/group/machines/drawingmachine/&quot;&gt;&lt;strong&gt;group assignment&lt;/strong&gt;&lt;/a&gt; page.
&lt;/p&gt;

&lt;hr /&gt;
&lt;h3 id=&quot;Second_Point_Header&quot;&gt;18.2. Bill of Materials&lt;/h3&gt;

&lt;p&gt;All materials and devices used to build this machine are listed in the table below:&lt;/p&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th&gt;Qty&lt;/th&gt;
      &lt;th&gt;Component name&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;1&lt;/td&gt;
      &lt;td&gt;Whiteboard&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;1&lt;/td&gt;
      &lt;td&gt;Whiteboard marker&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;1&lt;/td&gt;
      &lt;td&gt;Toothed belt&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;1&lt;/td&gt;
      &lt;td&gt;Arduino UNO&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;1&lt;/td&gt;
      &lt;td&gt;Power adaptor&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;1&lt;/td&gt;
      &lt;td&gt;Servo motor&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;2&lt;/td&gt;
      &lt;td&gt;Stepper motor&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;1&lt;/td&gt;
      &lt;td&gt;CNC shield&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;2&lt;/td&gt;
      &lt;td&gt;MP6500 Stepper motor driver&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;2&lt;/td&gt;
      &lt;td&gt;Heatsink for the stepper motor driver&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;1&lt;/td&gt;
      &lt;td&gt;Power supply&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;1&lt;/td&gt;
      &lt;td&gt;Digital multimeter&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;1&lt;/td&gt;
      &lt;td&gt;Screwdriver&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;hr /&gt;
&lt;h3 id=&quot;Third_Point_Header&quot;&gt;18.3. First try using Polograph &lt;/h3&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;
My first try programming was using &lt;strong&gt;Polograph&lt;/strong&gt; as explained in 
&lt;a href=&quot;https://www.instructables.com/id/XY-Plotter-Drawing-Robot-Arduino-Polargraph/&quot;&gt;this&lt;/a&gt; tutorial.
Software requirements for this tutorial includes installing &lt;strong&gt;Arduino IDE&lt;/strong&gt; and &lt;strong&gt;Processing IDE&lt;/strong&gt;.
&lt;/p&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;
First, I downloaded polograph libraries files from &lt;a href=&quot;https://drive.google.com/file/d/1cr-DoUZBqnKZMysA4maWBSGnXxeE0HJI/view&quot;&gt;&lt;strong&gt;here&lt;/strong&gt;&lt;/a&gt;. 
I copied the arduino libraries from &lt;strong&gt;((..\arduino-source\libraries))&lt;/strong&gt; folder and added them to Arduino IDE libraries.  
&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week18/libraries.png&quot; alt=&quot;libraries&quot; /&gt;&lt;/p&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;
Then I opened the source code &lt;strong&gt;((Polargraph\arduino-source\polargraph_server_a1))&lt;/strong&gt; and uploaded it 
to Arduino UNO.
&lt;/p&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;
Then I openend polograph Contorller file on processing IDE from 
&lt;strong&gt;((Polargraph 2017-11-01\controller\application.windows64\polargraphcontroller))&lt;/strong&gt;, 
but I got an error message about (size) function.
&lt;/p&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;
So I made a research about it and found some people that got same error as mine
and they solved it by installing an older version of processing IDE. 
So I did what they recommend and installed Processing IDE version 1.5.1 for windows 
from &lt;a href=&quot;https://processing.org/download/&quot;&gt;here&lt;/a&gt;. Finally, my g-code is uploaded !
&lt;/p&gt;

&lt;head&gt;
&lt;style type=&quot;text/css&quot;&gt;
.responsiveRapper {
	overflow:hidden;
	padding-bottom:56.25%;
	padding-top:30px;
	height:0;
	position:relative;
}
.responsiveRapper iframe,
.responsiveRapper object,
.responsiveRapper embed {
	top:0;
	left:0;
	width:100%;
	height:100%;
	position:absolute;
}
&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div class=&quot;responsiveRapper&quot;&gt;
  &lt;iframe src=&quot;https://player.vimeo.com/video/459784334&quot; width=&quot;500&quot; height=&quot;281&quot; frameborder=&quot;0&quot; webkitallowfullscreen=&quot;&quot; mozallowfullscreen=&quot;&quot; allowfullscreen=&quot;&quot;&gt;
  &lt;/iframe&gt;
&lt;/div&gt;
&lt;/body&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;
Then I started navigating the User interface and changed the machine settings from the &lt;strong&gt;SETUP&lt;/strong&gt; tab 
based on the hardware that we are intended to use.
&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week18/correctSettings.png&quot; alt=&quot;correctSettings&quot; /&gt;&lt;/p&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;
I uploaded a vector file, the g-code seemd uploaded correctly,
but I got an error which said that &quot;line is not on the page, skipping it.&quot;
we tried to connect one of the stepper motors, but it won't run.
So, we decided to shift to another software to save time.
&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week18/error_polo.jpeg&quot; alt=&quot;error_polo&quot; /&gt;&lt;/p&gt;

&lt;hr /&gt;
&lt;h3 id=&quot;Fourth_Point_Header&quot;&gt;18.4. Second try using Makelangelo &lt;/h3&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;
I decided to try &lt;strong&gt;&quot;Makelangelo&quot;&lt;/strong&gt;. 
After searching, I found that Makelangelo is not compatible with &lt;strong&gt;arduino UNO&lt;/strong&gt;. 
However, older version of Makelangelo is compatible with arduino UNO. 
&lt;/p&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;
After searching a lot, I found a topic on 
&lt;a href=&quot;https://www.marginallyclever.com/learn/forum/topic/makelangelo-suport-for-unoams/&quot;&gt;marginallyclever forum&lt;/a&gt; 
discussing the version that should work with Arduino UNO, which is &lt;strong&gt;7.11.0&lt;/strong&gt;.

I have downloaded the &lt;strong&gt;firmware&lt;/strong&gt; + &lt;strong&gt;software&lt;/strong&gt; for UNO+AMS from this 
&lt;a href=&quot;https://yadi.sk/d/MIuy9QKiWPkVlA&quot;&gt;&lt;strong&gt;link.&lt;/strong&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Software requirements:&lt;/strong&gt;&lt;/p&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;
Before running Makelangelo, there are some setup requirements that mentioned 
&lt;a href=&quot;https://github.com/MarginallyClever/Makelangelo-software/wiki/Getting-Started&quot;&gt;&lt;strong&gt;here.&lt;/strong&gt;&lt;/a&gt; 
It says that first you should install &lt;strong&gt;Open Java Development Kit&lt;/strong&gt; on your PC, which you can download it from 
&lt;a href=&quot;https://jdk.java.net/&quot;&gt;&lt;strong&gt;here.&lt;/strong&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;
Next step is to download and install &lt;strong&gt;Eclipse IDE&lt;/strong&gt;; you can download it from 
&lt;a href=&quot;https://www.eclipse.org/ide/&quot;&gt;&lt;strong&gt;here.&lt;/strong&gt;&lt;/a&gt; When you run it first time, 
you will get the following window, click on &lt;strong&gt;LAUNCH&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week18/Eclipse.png&quot; alt=&quot;Eclipse&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Select the workspace directory you want and click on &lt;strong&gt;Launch&lt;/strong&gt;.
&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week18/directory.png&quot; alt=&quot;directory&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Eclipse is starting:
&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week18/start.png&quot; alt=&quot;start&quot; /&gt;&lt;/p&gt;

&lt;p&gt;main page will look like this, click on “&lt;strong&gt;Import projects&lt;/strong&gt;”.
&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week18/import.png&quot; alt=&quot;import&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Click on “&lt;strong&gt;Git » Projects from Git&lt;/strong&gt;”.
&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week18/importProject.png&quot; alt=&quot;importProject&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Click on “&lt;strong&gt;Clone URI&lt;/strong&gt;”.
&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week18/clone.png&quot; alt=&quot;clone&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Paste the following link in the URI area and click &lt;strong&gt;“Next”&lt;/strong&gt;.&lt;/p&gt;
&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;https://github.com/MarginallyClever/Makelangelo-software
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week18/uri.png&quot; alt=&quot;uri&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Select &lt;strong&gt;dev &amp;amp; master branch&lt;/strong&gt; and click &lt;strong&gt;“Next”&lt;/strong&gt;.
&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week18/branch.png&quot; alt=&quot;branch&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Note the location of your local github folder for later.
&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week18/location.png&quot; alt=&quot;location&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Complete clone of repository.
&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week18/completeclone.png&quot; alt=&quot;completeclone&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Do not import project. Close the wizard.
&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week18/noImport.png&quot; alt=&quot;noImport&quot; /&gt;&lt;/p&gt;

&lt;p&gt;From the top bar menu click on &lt;strong&gt;File » Import » Maven » Existing Maven Projects » Next&lt;/strong&gt;.&lt;br /&gt;
&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week18/importmaven.png&quot; alt=&quot;importmaven&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Locate robot overlord folder in your local github folder. It’s the one that you noted in the &lt;strong&gt;Local Destination&lt;/strong&gt; step before.
&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week18/maven.png&quot; alt=&quot;maven&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Select &lt;strong&gt;Makelangelo-software » Debug As » Debug Configurations » Java Application.&lt;/strong&gt;
&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week18/application.png&quot; alt=&quot;application&quot; /&gt;
&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week18/javaapplication.png&quot; alt=&quot;javaapplication&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Click on &lt;strong&gt;New_configuration&lt;/strong&gt; and select &lt;strong&gt;com.marginallyclever.makelangelo.Makelangelo&lt;/strong&gt; as main class.
&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week18/newConf.png&quot; alt=&quot;newConf&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Wait while Eclipse builds the workspace.
&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week18/build.png&quot; alt=&quot;build&quot; /&gt;&lt;/p&gt;

&lt;p&gt;You will get the following window, navigate the list and select your java application you have added in the step before.
&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week18/selectJava.png&quot; alt=&quot;selectJava&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Run the application.
&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week18/run.png&quot; alt=&quot;run&quot; /&gt;&lt;/p&gt;

&lt;p&gt;You will get Makelangelo firmware window, select the correct port that you are connecting your Arduino UNO to.
&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week18/afterRun.png&quot; alt=&quot;afterRun&quot; /&gt;&lt;/p&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;
When I tried to upload a g-code, but I got an error message. 
Also, I tried to upload one of the SVG files provided in the makelangelo downloaded folder &quot;&lt;strong&gt;....\makelangelo-uno-AMS-win\windows\Makelangelo\M3 calibration pattern&lt;/strong&gt;&quot;, 
but it didn't work too. &lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week18/error.png&quot; alt=&quot;error&quot; /&gt;&lt;/p&gt;

&lt;hr /&gt;
&lt;h3 id=&quot;Fifth_Point_Header&quot;&gt;18.5. Third try using Universal G-Code Sender &lt;/h3&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;
I decided to try &lt;strong&gt;Universal G-Code Sender&lt;/strong&gt;. 
First, I have downloaded it from &lt;a href=&quot;https://github.com/winder/Universal-G-Code-Sender&quot;&gt;&lt;strong&gt;here.&lt;/strong&gt;&lt;/a&gt; 
Howerver, I didn't know how to install it from the previous mentioned link, so I followed 
&lt;a href=&quot;https://www.youtube.com/watch?v=P0Z3ONVh55c&quot;&gt;&lt;strong&gt;this&lt;/strong&gt;&lt;/a&gt; tutorial. 
Another downloading link is mentioned in the tutorial, which is 
&lt;a href=&quot;https://winder.github.io/ugs_website/download/&quot;&gt;&lt;strong&gt;this&lt;/strong&gt;&lt;/a&gt; one. 
So I have deleted the previous one and used the new one.
&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week18/universal.png&quot; alt=&quot;universal&quot; /&gt;&lt;/p&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;
Universal G-Code Sender is a java based firmware, so first you need to install java from 
&lt;a href=&quot;https://www.java.com/en/download/win10.jsp&quot;&gt;&lt;strong&gt;here&lt;/strong&gt;&lt;/a&gt; if you don't have it on the PC you are using.
&lt;/p&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;
When the &lt;strong&gt;ugsplatform&lt;/strong&gt; folder is downloaded, open the &lt;strong&gt;bin&lt;/strong&gt; folder and run the application 
that suit your PC; for me I run &lt;strong&gt;ugsplatform64&lt;/strong&gt;.
&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week18/app.png&quot; alt=&quot;app&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Main page of &lt;strong&gt;Universal G-Code Platform&lt;/strong&gt;:
&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week18/mainpage.png&quot; alt=&quot;mainpage&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;First test:&lt;/strong&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;
First, I have tried moving one stepper motor manually using X and Y arrows and it worked. Test process is shown in the following video.
&lt;/p&gt;

&lt;head&gt;
&lt;style type=&quot;text/css&quot;&gt;
.responsiveRapper {
	overflow:hidden;
	padding-bottom:56.25%;
	padding-top:30px;
	height:0;
	position:relative;
}
.responsiveRapper iframe,
.responsiveRapper object,
.responsiveRapper embed {
	top:0;
	left:0;
	width:100%;
	height:100%;
	position:absolute;
}
&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div class=&quot;responsiveRapper&quot;&gt;
  &lt;iframe src=&quot;https://player.vimeo.com/video/461582774&quot; width=&quot;500&quot; height=&quot;281&quot; frameborder=&quot;0&quot; webkitallowfullscreen=&quot;&quot; mozallowfullscreen=&quot;&quot; allowfullscreen=&quot;&quot;&gt;
  &lt;/iframe&gt;
&lt;/div&gt;
&lt;/body&gt;

&lt;p&gt;&lt;strong&gt;Second test:&lt;/strong&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;
After that, I sent a simple g-code, which is a circle. You can download it from 
&lt;a href=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week17/circle.nc&quot;&gt;&lt;strong&gt;here&lt;/strong&gt;&lt;/a&gt;.
As shown in the following video, we were using a big pen holder that designed by on of my group members 
to hold two pens and shift between the pens using a servo motor in the front middle. The result was unstable 
movement of the pen and unclear shape was drawn.
&lt;/p&gt;

&lt;head&gt;
&lt;style type=&quot;text/css&quot;&gt;
.responsiveRapper {
	overflow:hidden;
	padding-bottom:56.25%;
	padding-top:30px;
	height:0;
	position:relative;
}
.responsiveRapper iframe,
.responsiveRapper object,
.responsiveRapper embed {
	top:0;
	left:0;
	width:100%;
	height:100%;
	position:absolute;
}
&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div class=&quot;responsiveRapper&quot;&gt;
  &lt;iframe src=&quot;https://player.vimeo.com/video/461592168&quot; width=&quot;500&quot; height=&quot;281&quot; frameborder=&quot;0&quot; webkitallowfullscreen=&quot;&quot; mozallowfullscreen=&quot;&quot; allowfullscreen=&quot;&quot;&gt;
  &lt;/iframe&gt;
&lt;/div&gt;
&lt;/body&gt;

&lt;p&gt;The result:
&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week18/circleResult.jpeg&quot; alt=&quot;circleResult&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Third test:&lt;/strong&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;
Later, we decided to use a smaller design for the pen holder and send the circle g-code again. 
The result was a more stable movement of the pen, however the circle was drawn as an oval shape.
&lt;/p&gt;

&lt;head&gt;
&lt;style type=&quot;text/css&quot;&gt;
.responsiveRapper {
	overflow:hidden;
	padding-bottom:56.25%;
	padding-top:30px;
	height:0;
	position:relative;
}
.responsiveRapper iframe,
.responsiveRapper object,
.responsiveRapper embed {
	top:0;
	left:0;
	width:100%;
	height:100%;
	position:absolute;
}
&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div class=&quot;responsiveRapper&quot;&gt;
  &lt;iframe src=&quot;https://player.vimeo.com/video/462157649&quot; width=&quot;500&quot; height=&quot;281&quot; frameborder=&quot;0&quot; webkitallowfullscreen=&quot;&quot; mozallowfullscreen=&quot;&quot; allowfullscreen=&quot;&quot;&gt;
  &lt;/iframe&gt;
&lt;/div&gt;
&lt;/body&gt;

&lt;p&gt;&lt;strong&gt;Final result:&lt;/strong&gt;
&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week18/oval.jpeg&quot; alt=&quot;oval&quot; /&gt;&lt;/p&gt;

&lt;hr /&gt;
&lt;h3 id=&quot;Sixth_Point_Header&quot;&gt;18.6. Fourth try using Grbl Controller &lt;/h3&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;
Later, I have searched about other alternative softwares to send the g-code and found &lt;a href=&quot;https://www.thingiverse.com/thing:3875761&quot;&gt;&lt;strong&gt;this&lt;/strong&gt;&lt;/a&gt; 
useful tutorial that uses &lt;strong&gt;Grbl Controller&lt;/strong&gt;. 
&lt;/p&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;
First step is to download Grbl from &lt;a href=&quot;https://github.com/ilaro-org/grbl-polar&quot;&gt;&lt;strong&gt;here.&lt;/strong&gt;&lt;/a&gt; 
Then copy the &lt;strong&gt;grbl-polar-master&lt;/strong&gt; folder and paste it in the Arduino IDE libraries folder in your PC. 
After adding the Grbl library, open &lt;strong&gt;grblUpload&lt;/strong&gt; example code and upload it to your microcontroller ((Arduino UNO)).
&lt;/p&gt;

&lt;p&gt;I got the following error when I uploaded the code to Arduino UNO first time.
&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week18/grblupload1.png&quot; alt=&quot;grblupload1&quot; /&gt;&lt;/p&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;
After disconnecting and reconnecting Arduino UNO USB, the code was uploaded but servo motor still not moving. 
Even though, we have moved to the next step because the time is running out.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week18/grblupload2.png&quot; alt=&quot;grblupload2&quot; /&gt;&lt;/p&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;
Next step is to open Grbl Controller, select the correct port name of your Arduino UNO, Baud Rate, 
choose the file you want to send and click &lt;strong&gt;Begin&lt;/strong&gt;. However, the result was the same when uploading the circle g-code, which is an oval shape drawing.
&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Current limiting:&lt;/strong&gt;&lt;/p&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;
We found that we should set the current limit on the stepper motor driver using the VREF voltage before connecting it to the stepper motor. 
To do this, we used a power supply, a digital multimeter, a small screwdriver, and of course our stepper motor driver system connected to the CNC sheild. We have followed the tutorial video in &lt;a href=&quot;https://www.pololu.com/product/2966&quot;&gt;&lt;strong&gt;Pololu&lt;/strong&gt;&lt;/a&gt; site.
&lt;/p&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;
First, you need to determine the amount of cuurent you want to use to run the stepper motor 
so you should start with finding the rated current per phase of the motor 
(i.e. maximum current that the motor was designed for). 
It is written that the &lt;strong&gt;current limit = 1.5 A&lt;/strong&gt; on the stepper motors we are using. 
Then you can use this value in the current limiting equation to find the VREF that you need to set:
&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Current Limit = VREF*2
1.5 A = X*2
X = 0.75 V = 750mV
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;
Next, connect the power supply to the CNC sheild and set the power to 5 Volts. 
Use the digital multimeter to measure the voltgae at the VREF. 
Use a acrewdriver to screw or unsrew the potentiometer in order to change the VREF value.
&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week18/currentlimit.jpeg&quot; alt=&quot;currentlimit&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Problem faced:&lt;/strong&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;
Also, we found that there is a missing jumper wire on the CNC sheild under the motor driver place. 
That might be the reason for the unbalanced movement between the two stepper motors.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week18/jumper.jpeg&quot; alt=&quot;jumper&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Grbl running: &lt;/strong&gt;&lt;/p&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;
In the Grbl Controller, I have selected the correct port name of my Arduino UNO (COM7), Baud Rate (115200), 
chose the circle g-code again and click on &lt;strong&gt;Begin&lt;/strong&gt;. &lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week18/circle.jpeg&quot; alt=&quot;circle&quot; /&gt;&lt;/p&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;
Finally, the circle shape is drawn accurately. So we tried to send another file, which is 
&lt;a href=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week18/thankyou.svg&quot;&gt;this&lt;/a&gt; 
file and click on &lt;strong&gt;Begin&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week18/grbl.png&quot; alt=&quot;grbl&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Final result:&lt;/strong&gt;
&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week18/finalResult.jpg&quot; alt=&quot;finalResult&quot; /&gt;&lt;/p&gt;

&lt;hr /&gt;
</description>
        <pubDate>Wed, 27 May 2020 19:00:47 +0300</pubDate>
        <link>http://localhost:4000/2020/labs/bahrain/students/maryam-ali/posts/2020/05/27/week18.html</link>
        <guid isPermaLink="true">http://localhost:4000/2020/labs/bahrain/students/maryam-ali/posts/2020/05/27/week18.html</guid>
        
        <category>week 18</category>
        
        
        <category>posts</category>
        
      </item>
    
      <item>
        <title>17. Wildcard week</title>
        <description>&lt;p style=&quot;text-align: justify;&quot;&gt;
The aim of this week assignment is to design and produce something with a digital fabrication process 
(incorporating computer-aided design and manufacturing) and including everything necessary to reproduce it.
&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Content:&lt;/strong&gt;&lt;/p&gt;
&lt;div id=&quot;toc_container&quot;&gt;
&lt;ul class=&quot;toc_list&quot;&gt;
&lt;li&gt;&lt;a href=&quot;#First_Point_Header&quot;&gt;17.1. First try.&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#Second_Point_Header&quot;&gt;17.2.Second try.&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#Third_Point_Header&quot;&gt;17.3. Third try.&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Machines used:&lt;/strong&gt;&lt;/p&gt;
&lt;div id=&quot;toc_container&quot;&gt;
&lt;ul class=&quot;toc_list&quot;&gt;
&lt;li&gt;3D printer.&lt;/li&gt;
&lt;li&gt;Laser cutter.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Softwares used:&lt;/strong&gt;&lt;/p&gt;
&lt;div id=&quot;toc_container&quot;&gt;
&lt;ul class=&quot;toc_list&quot;&gt;
&lt;li&gt;PrusaControl.&lt;/li&gt;
&lt;li&gt;Fusion360.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Useful resources:&lt;/strong&gt;&lt;/p&gt;
&lt;div id=&quot;toc_container&quot;&gt;
&lt;ul class=&quot;toc_list&quot;&gt;
&lt;li&gt;&lt;a href=&quot;https://www.instructables.com/id/How-to-3D-Print-Onto-Fabric/&quot;&gt;How to 3D Print Onto Fabric.&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://class.textile-academy.org/2019/romaindivozzo/assignments/WEEK%2007:%20Computational%20Couture/&quot;&gt;Computational Couture.&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Design files:&lt;/strong&gt;&lt;/p&gt;
&lt;div id=&quot;toc_container&quot;&gt;
&lt;ul class=&quot;toc_list&quot;&gt;
&lt;li&gt;&lt;a href=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week17/maleSnapC3.stl&quot;&gt;Male snaps&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week17/femaleSnapC3.stl&quot;&gt;Female snaps&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/final_project/Shank_circuit_enclosure_Version3 v14.f3d&quot;&gt;Circuit enclosure design&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week17/Circular_Pattern_Shank.dxf&quot;&gt;Circular pattern dxf file&lt;/a&gt;.&lt;/li&gt; 
&lt;li&gt;&lt;a href=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week17/Circular_Pattern_Shank v1.f3d&quot;&gt;Circular pattern Fusion360 file&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;

&lt;hr /&gt;
&lt;p&gt;&lt;strong&gt;Introduction:&lt;/strong&gt;&lt;/p&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;
For wildcard week I have tried 3D printing on fabric for the first time. 
I have explored many techniques and uses of printing on fabric to come up with the best for my final project requirements. 
Printing on fabric has many possibilities that can be applied for different needs. &lt;/p&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;
For this week assignment I have tried printing on two types of fabrics, which are nylon and cotton. 
I tried on three printers, which are &lt;strong&gt;Prusa MK2&lt;/strong&gt;, &lt;strong&gt;MakerBot 5th Generation&lt;/strong&gt;, and &lt;strong&gt;Ultimaker 2+&lt;/strong&gt;. 
I used &lt;strong&gt;PLA&lt;/strong&gt; for printing.
&lt;/p&gt;

&lt;hr /&gt;
&lt;h3 id=&quot;First_Point_Header&quot;&gt;17.1. First try&lt;/h3&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;
As a first try, I chose to 3D print on nylon fabric using &lt;strong&gt;Prusa MK2&lt;/strong&gt; 3D printer with &lt;strong&gt;PLA&lt;/strong&gt; filament. 
First, I cut a piece of fabric that is a little smaller than the printable area (3D printer bed size), which is &lt;strong&gt;210x200 mm&lt;/strong&gt;.
&lt;/p&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th&gt;No&lt;/th&gt;
      &lt;th&gt;Specification&lt;/th&gt;
      &lt;th&gt;Item&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;1&lt;/td&gt;
      &lt;td&gt;Fabric&lt;/td&gt;
      &lt;td&gt;Nylon&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;2&lt;/td&gt;
      &lt;td&gt;3D Printer&lt;/td&gt;
      &lt;td&gt;Prusa MK2&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;3&lt;/td&gt;
      &lt;td&gt;Filament&lt;/td&gt;
      &lt;td&gt;PLA&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;&lt;strong&gt;Prusa MK2 printer:&lt;/strong&gt;
&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week17/prusa.jpeg&quot; alt=&quot;prusa&quot; /&gt;&lt;/p&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;
As a beginning, I tried printing something from the internet. The printing file I used is a 1mm snap design from 
&lt;a href=&quot;https://www.instructables.com/id/How-to-3D-Print-Onto-Fabric/&quot;&gt;this&lt;/a&gt; great instructable. 
There are male and female snaps .stl design file; I chose only male for my firt try. 
You can download it from 
&lt;a href=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week17/maleSnapC3.stl&quot;&gt;here&lt;/a&gt;.
&lt;/p&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;
Later, I did the slicing using &lt;strong&gt;PrusaContorl&lt;/strong&gt; and generate the g-code for printing. For details, refer to 3D Scanning and Printing 
&lt;a href=&quot;http://duaa.alaali.fabcloud.io/group/assignments/docs_assignments_week06/&quot;&gt;group assignment&lt;/a&gt; page.
&lt;/p&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;
To prepare the 3D printer, first I loaded the filament (&lt;strong&gt;PLA&lt;/strong&gt;), then I heated up the printer bed and the nozzle.
I imported the design g-code using an SD card.
&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Loading filament:&lt;/strong&gt;
&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week17/loading.jpeg&quot; alt=&quot;loading&quot; /&gt;&lt;/p&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;
After preparing the piece of fabric for printing, I have used a masking tape to fix the fabric on the printer bed. 
First I tape one side, then I stretch the fabric a little bit while taping the opposite side. 
For the other two sides, I repeat the same process and make sure that the fabric is slightly taut. Finally, satrt printing.
&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Masking tape:&lt;/strong&gt;
&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week17/masking_tape.jpeg&quot; alt=&quot;masking_tape&quot; /&gt;&lt;/p&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;
While the 3D printer doing the first layer, the nylon fabric was burned due to the high temperature of the filament. 
Also, it cut the fabric in the area of printing. After that I stopped the printer and removed the fabric.
&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Final result:&lt;/strong&gt;
&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week17/nylon.jpeg&quot; alt=&quot;nylon&quot; /&gt;&lt;/p&gt;

&lt;hr /&gt;
&lt;h3 id=&quot;Second_Point_Header&quot;&gt;17.2. Second try&lt;/h3&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;
Later, I tried printing on a thicker fabric that can resist the high temperature of the filament. 
I chose to print on cotton fabric, so I prepared a piece of this fabric and sticked it on the 3D printer bed using a masking tape 
as explained in the first try.
&lt;/p&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;
Howerver, this time I have used &lt;strong&gt;Ultimaker 2+&lt;/strong&gt; printer and print both male and female snaps .stl design files. You can download 
&lt;a href=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week17/maleSnapC3.stl&quot;&gt;male&lt;/a&gt; 
and &lt;a href=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week17/femaleSnapC3.stl&quot;&gt;female&lt;/a&gt; 
snaps from here.
&lt;/p&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th&gt;No&lt;/th&gt;
      &lt;th&gt;Specification&lt;/th&gt;
      &lt;th&gt;Item&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;1&lt;/td&gt;
      &lt;td&gt;Fabric&lt;/td&gt;
      &lt;td&gt;Cotton&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;2&lt;/td&gt;
      &lt;td&gt;3D Printer&lt;/td&gt;
      &lt;td&gt;Ultimaker 2+&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;3&lt;/td&gt;
      &lt;td&gt;Filament&lt;/td&gt;
      &lt;td&gt;PLA&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;
This time the fabric didn't burn from the filament and the result was acceptable. 
However, there were some lines of filament sticked on the fabric in the area between the snaps 
where the nozzle was moving to print the three snaps. Later, I removed this lines manually.
&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week17/secondtry.jpeg&quot; alt=&quot;secondtry&quot; /&gt;&lt;/p&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;
The snaps can be closed as showing in the following picture by pressing the male snaps inside the female ones. 
However, the male snaps didn't stick well on the fabric and fell down easily.
&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week17/snaps.jpeg&quot; alt=&quot;snaps&quot; /&gt;&lt;/p&gt;

&lt;hr /&gt;
&lt;h3 id=&quot;Third_Point_Header&quot;&gt;17.3. Third try&lt;/h3&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;
To stick the printnig filament on fabric very well, I used another technique this time. 
I have used &lt;strong&gt;Fusion360&lt;/strong&gt; to design a mesh of circles of 4mm diameter and sent it to the laser cutter to create 
a mesh cut on the fabric. The mesh cut should covered the base area of my 3D design. 
Later, I have exported the mesh design as &lt;strong&gt;.dxf&lt;/strong&gt; file. You can download the dxf file from 
&lt;a href=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week17/Circular_Pattern_Shank.dxf&quot;&gt;&lt;strong&gt;here&lt;/strong&gt;&lt;/a&gt; 
and the Fusion360 editable design file from 
&lt;a href=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week17/Circular_Pattern_Shank v1.f3d&quot;&gt;&lt;strong&gt;here&lt;/strong&gt;&lt;/a&gt;. 
&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week17/Circular_Pattern.png&quot; alt=&quot;Circular_Pattern&quot; /&gt;&lt;/p&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;
I run multiple laser cutting tests on the same fabric that I want to print my design on with different machine settings. 
Based on the results shown below, the second test (power 20, speed 200) was the best one as it didn't burn the fabric and 
it gave sharp and neat round cut. Therefore, I have used the second test settings &lt;strong&gt;(power 20, speed 200)&lt;/strong&gt;.
&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Laser cutting:&lt;/strong&gt;
&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week17/laser.jpeg&quot; alt=&quot;laser&quot; /&gt;
&lt;strong&gt;Laser cutter tests:&lt;/strong&gt;
&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week17/tests.jpeg&quot; alt=&quot;tests&quot; /&gt;&lt;/p&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;
The design I printed this time is done by me for my final project. It's an encloser for my project circuit. 
You can download the design file from 
&lt;a href=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/final_project/Shank_circuit_enclosure_Version3 v14.f3d&quot;&gt;here.&lt;/a&gt;
Refer to my &lt;a href=&quot;http://fabacademy.org/2020/labs/bahrain/students/maryam-ali/mechanicaldesign.html&quot;&gt;final project page&lt;/a&gt; for slicing settings.
&lt;/p&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;
Later, I have printed the first few layers of my 3D design file.  
Then I stopped the printer and sticked the fabric well on the 3D printer bed using a masking tape as explained in the first try. 
And finally, I resumed the printing. 
&lt;/p&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th&gt;No&lt;/th&gt;
      &lt;th&gt;Specification&lt;/th&gt;
      &lt;th&gt;Item&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;1&lt;/td&gt;
      &lt;td&gt;Fabric&lt;/td&gt;
      &lt;td&gt;Cotton&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;2&lt;/td&gt;
      &lt;td&gt;3D Printer&lt;/td&gt;
      &lt;td&gt;Prusa MK2&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;3&lt;/td&gt;
      &lt;td&gt;Filament&lt;/td&gt;
      &lt;td&gt;PLA&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;&lt;br /&gt;
&lt;strong&gt;3D printing on fabric:&lt;/strong&gt;&lt;/p&gt;

&lt;head&gt;
&lt;style type=&quot;text/css&quot;&gt;
.responsiveRapper {
	overflow:hidden;
	padding-bottom:56.25%;
	padding-top:30px;
	height:0;
	position:relative;
}
.responsiveRapper iframe,
.responsiveRapper object,
.responsiveRapper embed {
	top:0;
	left:0;
	width:100%;
	height:100%;
	position:absolute;
}
&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div class=&quot;responsiveRapper&quot;&gt;
  &lt;iframe src=&quot;https://player.vimeo.com/video/459161784&quot; width=&quot;500&quot; height=&quot;281&quot; frameborder=&quot;0&quot; webkitallowfullscreen=&quot;&quot; mozallowfullscreen=&quot;&quot; allowfullscreen=&quot;&quot;&gt;
  &lt;/iframe&gt;
&lt;/div&gt;
&lt;/body&gt;

&lt;p&gt;&lt;strong&gt;Final result:&lt;/strong&gt;&lt;/p&gt;

&lt;head&gt;
&lt;style type=&quot;text/css&quot;&gt;
.responsiveRapper {
	overflow:hidden;
	padding-bottom:56.25%;
	padding-top:30px;
	height:0;
	position:relative;
}
.responsiveRapper iframe,
.responsiveRapper object,
.responsiveRapper embed {
	top:0;
	left:0;
	width:100%;
	height:100%;
	position:absolute;
}
&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div class=&quot;responsiveRapper&quot;&gt;
  &lt;iframe src=&quot;https://player.vimeo.com/video/459162852&quot; width=&quot;500&quot; height=&quot;281&quot; frameborder=&quot;0&quot; webkitallowfullscreen=&quot;&quot; mozallowfullscreen=&quot;&quot; allowfullscreen=&quot;&quot;&gt;
  &lt;/iframe&gt;
&lt;/div&gt;
&lt;/body&gt;

&lt;hr /&gt;

</description>
        <pubDate>Wed, 20 May 2020 19:00:47 +0300</pubDate>
        <link>http://localhost:4000/2020/labs/bahrain/students/maryam-ali/posts/2020/05/20/week17.html</link>
        <guid isPermaLink="true">http://localhost:4000/2020/labs/bahrain/students/maryam-ali/posts/2020/05/20/week17.html</guid>
        
        <category>week 17</category>
        
        
        <category>posts</category>
        
      </item>
    
      <item>
        <title>16. Molding and casting</title>
        <description>&lt;p style=&quot;text-align: justify;&quot;&gt;
For this week &lt;strong&gt;group assignment&lt;/strong&gt;, we have to review the safety data sheets for each of our lab molding and casting materials 
and make and compare test casts with each of them. 
The &lt;strong&gt;individual assignment&lt;/strong&gt; is to design a 3D mould, mill it, and use it to cast parts.
&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Assignment content:&lt;/strong&gt;&lt;/p&gt;
&lt;div id=&quot;toc_container&quot;&gt;
&lt;ul class=&quot;toc_list&quot;&gt;
&lt;li&gt;&lt;a href=&quot;#First_Point_Header&quot;&gt;16.1. Group assignment. &lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#Second_Point_Header&quot;&gt;16.2. Individual assignment.&lt;/a&gt;&lt;/li&gt;

&lt;div id=&quot;toc_container&quot;&gt;
&lt;ul class=&quot;toc_list&quot;&gt;
&lt;li&gt;&lt;a href=&quot;#First_Second_Point_Header&quot;&gt;16.2.1. 3D Design. &lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#Second_Second_Point_Header&quot;&gt;16.2.2. Milling. &lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#Third_Second_Point_Header&quot;&gt;16.2.3. Molding.&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#Fourth_Second_Point_Header&quot;&gt;16.2.4. Casting.&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;

&lt;/ul&gt;
&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Softwares used:&lt;/strong&gt;&lt;/p&gt;
&lt;div id=&quot;toc_container&quot;&gt;
&lt;ul class=&quot;toc_list&quot;&gt;
&lt;li&gt;Fusion 360.&lt;/li&gt;
&lt;li&gt;SRP Player.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Machines used:&lt;/strong&gt;&lt;/p&gt;
&lt;div id=&quot;toc_container&quot;&gt;
&lt;ul class=&quot;toc_list&quot;&gt;
&lt;li&gt;Milling mahcine - Roland SRM-20.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Safety datasheets:&lt;/strong&gt;&lt;/p&gt;
&lt;div id=&quot;toc_container&quot;&gt;
&lt;ul class=&quot;toc_list&quot;&gt;
&lt;li&gt;&lt;a href=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week16/EN_VBS26_TDS.pdf&quot; title=&quot;Holder&quot;&gt;Technical Data Sheet.&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week16/EN_VBS26A-MSDS-2018.pdf&quot;&gt;VBS26A Safety data sheet.&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week16/EN_VBS26B-MSDS-2018.pdf&quot;&gt;VBS26B Safety data sheet.&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Final version of this week files:&lt;/strong&gt;&lt;/p&gt;
&lt;div id=&quot;toc_container&quot;&gt;
&lt;ul class=&quot;toc_list&quot;&gt;
&lt;li&gt;&lt;a href=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week16/Mickey second version v1.f3d&quot; title=&quot;Holder&quot;&gt;3D Design Fusion360 file.&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week16/Mickey second version v1.stl&quot;&gt;3D Design .stl file.&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;

&lt;hr /&gt;
&lt;h3 id=&quot;First_Point_Header&quot;&gt;16.1. Group assignment &lt;/h3&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;
For this week the group assignment is to review the safety data sheets for each of our molding and casting materials.
Click &lt;a href=&quot;http://duaa.alaali.fabcloud.io/group/assignments/Moulding_and_Casting/&quot;&gt;&lt;strong&gt;here&lt;/strong&gt;&lt;/a&gt; to enter the group assignment page.
&lt;/p&gt;

&lt;hr /&gt;
&lt;h3 id=&quot;Second_Point_Header&quot;&gt;16.2. Individual assignment &lt;/h3&gt;

&lt;h4 id=&quot;First_Second_Point_Header&quot;&gt;16.2.1. 3D Design &lt;/h4&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;
For this assignment I was thinking of making a small and simple design because this is my first time to do molding and casting, 
so I don't have experience with it and don't know how my design will be made physically. 
Therefore, I have designed Mickey Mouse face, which basically consists of circles, ellipses, slots, and conic curves. 
To do the design I have used &lt;strong&gt;Fusion 360&lt;/strong&gt;. 
&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Final Design:&lt;/strong&gt;&lt;/p&gt;
&lt;html&gt;
&lt;head&gt;
&lt;style type=&quot;text/css&quot;&gt;
.responsiveRapper {
	overflow:hidden;
	padding-bottom:56.25%;
	padding-top:30px;
	height:0;
	position:relative;
}
.responsiveRapper iframe,
.responsiveRapper object,
.responsiveRapper embed {
	top:0;
	left:0;
	width:100%;
	height:100%;
	position:absolute;
}
&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div class=&quot;responsiveRapper&quot;&gt;
&lt;iframe src=&quot;https://sketchfab.com/embed/773fe97b8980453d839b6f5f00fed099&quot; width=&quot;560&quot; height=&quot;315&quot; frameborder=&quot;0&quot; allowfullscreen=&quot;&quot;&gt;
&lt;/iframe&gt;
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;

&lt;hr /&gt;
&lt;h4 id=&quot;Second_Second_Point_Header&quot;&gt;16.2.2. Milling &lt;/h4&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;First, prepare the workpiece that you want to mill. For my design, I used a &lt;strong&gt;Wax block&lt;/strong&gt;. 
However, the one that is available in the lab is small in size so I've sticked two wax blocks together by heating one of the sides and push them towards each other.&lt;/p&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;Size of the workpiece after sticking two blocks is &lt;strong&gt;87mm X 76mm X 20mm&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week16/wax.PNG&quot; alt=&quot;wax&quot; /&gt;&lt;/p&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;
&lt;strong&gt;SRP Player&lt;/strong&gt; was used to prepare my design file for the milling process. 
First, Open the .stl design file in SRP Player and the steps will be outlined clearly in order on the left side of the screen.
&lt;/p&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;strong&gt;Model Size and Orientation&lt;/strong&gt;: Set the model size a little bit smaller than the workpiece that will be used for milling, which is 87mm, 76mm, 2mm. Size settings: 75.1mm, 68.61mm, 16mm. 
Adjust the orentation of the model to face up around z-axis.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week16/size.png&quot; alt=&quot;size&quot; /&gt;&lt;/p&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;strong&gt;Type of Milling&lt;/strong&gt;: Choose the type of milling as &lt;strong&gt;Better surface finish&lt;/strong&gt;, &lt;strong&gt;Model with many curved surfaces&lt;/strong&gt;, and &lt;strong&gt;Block workpiece &amp;gt;&amp;gt; Cut top only&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week16/type.png&quot; alt=&quot;type&quot; /&gt;&lt;/p&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;strong&gt;Create Tool Path&lt;/strong&gt;: Choose workpiece material as &lt;strong&gt;Modeling Wax&lt;/strong&gt; and set the actual workpiece size so the software can shape the outline around the model. 
Create tool path needed for the milling; there is a list of tools to choose from. However, I have created my own tool with the follwing settings based on the milling bit that I'll use, which is &lt;strong&gt;1/16 mill&lt;/strong&gt;:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week16/bit.jpeg&quot; alt=&quot;bit&quot; /&gt;&lt;/p&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;
There are two types of milling operations when cutting a 3D file, which are &lt;strong&gt;Rough&lt;/strong&gt; and &lt;strong&gt;Finish&lt;/strong&gt; cut. 
the &lt;strong&gt;Rough cut&lt;/strong&gt; is the process of removing the majority of the material quickly with a rough finish. 
The aim of this process is to remove the most material in the shortest amount of time. 
While the &lt;strong&gt;Finish cut&lt;/strong&gt; cleans up the part to its final shape and gives a smooth surface finish.
&lt;/p&gt;

&lt;p&gt;The following screenshot shows the Roughing and Finishing parameters. To understand these parameters read the following points:&lt;/p&gt;

&lt;div id=&quot;toc_container&quot;&gt;
&lt;ul class=&quot;toc_list&quot;&gt;
&lt;li&gt;&lt;strong&gt;Feed Rate:&lt;/strong&gt; the speed of moving tool.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Spindle:&lt;/strong&gt; how fast the tool spinning.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Cutting-in-Amount:&lt;/strong&gt; the tool's depth of cut.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Path Interval:&lt;/strong&gt; the distance between tool passes. Finishing passes (0.3mm) are smaller than Roughing
passes (1.19mm). &lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Finish Margin:&lt;/strong&gt; the amount of material left on the model after the process has finished. 
Also, Finishing margin (0mm) are smaller than Roughing margin (0.50mm).  &lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;

&lt;p&gt;&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week16/toolpath.png&quot; alt=&quot;toolpath&quot; /&gt;&lt;/p&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;strong&gt;Preview Results&lt;/strong&gt;: This will show you the cutting process before operating the milling machine and will show the estimated cutting time, which is 3.4 hour for my design. &lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week16/preview.png&quot; alt=&quot;preview&quot; /&gt;&lt;/p&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;strong&gt;Perform Cuttting&lt;/strong&gt;: By clicking on &lt;strong&gt;Start Cutting...&lt;/strong&gt; the milling machine will start cutting. But, before that we need to fix the workpiece on the machine bed and setting the origin point.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week16/perform.png&quot; alt=&quot;perform&quot; /&gt;&lt;/p&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;Mark the centre point of the wax block to adjust the origin point of the machine based on it.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week16/origin.PNG&quot; alt=&quot;origin&quot; /&gt;&lt;/p&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;Fix the wax block on the milling machine bed with the aid of a double sided tape.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week16/tape.jpeg&quot; alt=&quot;tape&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Click on &lt;strong&gt;Start Cutting.. » Next&lt;/strong&gt;.
&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week16/cutting.png&quot; alt=&quot;cutting&quot; /&gt;&lt;/p&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;The final result of milling shows that the small area between the nose and the line under the eyes is not millied because the milling bit is larger than this area.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week16/milling2.jpeg&quot; alt=&quot;milling2&quot; /&gt;
&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week16/milling.jpeg&quot; alt=&quot;milling&quot; /&gt;&lt;/p&gt;

&lt;hr /&gt;
&lt;h4 id=&quot;Third_Second_Point_Header&quot;&gt;16.2.3. Molding &lt;/h4&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;
&lt;strong&gt;Molding&lt;/strong&gt; is the process of manufacturing by shaping a material from the cavity of the original model. 
The material I used for molding is &lt;strong&gt;Silicone VBS26-35&lt;/strong&gt;, which is 2-part addition cure silicone. 
&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Safety measures:&lt;/strong&gt;&lt;/p&gt;
&lt;div id=&quot;toc_container&quot;&gt;
&lt;ul class=&quot;toc_list&quot;&gt;
&lt;li&gt;Do not eat, drink or smoke while using the material.&lt;/li&gt;
&lt;li&gt;Do not touch the material directly by hand, wear rubber gloves before using. &lt;/li&gt;
&lt;li&gt;Material is not safe for food.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Tools:&lt;/strong&gt;
&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week16/tools.jpeg&quot; alt=&quot;tools&quot; /&gt;&lt;/p&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;
I started by filling my model with water then pouring this water into an empty cup and measuring the weight of water 
in order to determine the amount of material required to fill my model. Water weight = 75 g.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week16/filling.jpg&quot; alt=&quot;filling&quot; /&gt;&lt;/p&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;
I used &quot;&lt;a href=&quot;https://alanharpercomposites.com/silicone-vbs26-35-available-40kg-packs/&quot;&gt;&lt;strong&gt;2 Part Addition cure silicone moulding rubber&lt;/strong&gt;&lt;/a&gt;&quot; 
as the molding material. I wore gloves and opened the 2 materials bottles. I poured 75 g from each material to make 150 g into seperate cups and weight them. 
Although the filling water weight was 75 g, I made 150 g from the silicon material taking into account its high density and the material that may stick inside the cups.
&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week16/silicon.jpeg&quot; alt=&quot;silicon&quot; /&gt;&lt;/p&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;
Later, I poured both materials into one cup and mixed them very well using a wood stick. After mixing, 
I poured the solution into my model and make sure it fully covered the area of my model.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week16/pouring.jpeg&quot; alt=&quot;pouring&quot; /&gt;&lt;/p&gt;

&lt;p&gt;There were some bubbles in the solution, so I used the heat gun to remove them.
&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week16/heatGun.jpeg&quot; alt=&quot;heatGun&quot; /&gt;&lt;/p&gt;

&lt;p&gt;I waited for it to dry and remove it after six hours. Here is the final result of molding:
&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week16/molding.jpeg&quot; alt=&quot;molding&quot; /&gt;&lt;/p&gt;

&lt;hr /&gt;
&lt;h4 id=&quot;Fourth_Second_Point_Header&quot;&gt;16.2.4. Casting &lt;/h4&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;
For casting I melted a chocolate bar in the microwave and poured it in my mold. I kept the mold with the chocolate in the fridge for 2 hours. 
But first, I sticked a cling film on my mold before pouring the chocolate because the silison material is not safe for food. &lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week16/casting.PNG&quot; alt=&quot;casting&quot; /&gt;&lt;/p&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;
Final result of casting doesn't show the details of the molding shape because the chocolate was not poured directly on the mold. Some lines of the cling film were shown in the casting surface.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Final result:&lt;/strong&gt;
&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week16/castingResult.jpeg&quot; alt=&quot;castingResult&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Three steps of the assignment:&lt;/strong&gt;
&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week16/steps.jpg&quot; alt=&quot;steps&quot; /&gt;&lt;/p&gt;

&lt;p&gt;After that, I tried casting with clay and the result was better.
&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week16/clay.jpeg&quot; alt=&quot;clay&quot; /&gt;&lt;/p&gt;

&lt;hr /&gt;

</description>
        <pubDate>Wed, 13 May 2020 19:00:47 +0300</pubDate>
        <link>http://localhost:4000/2020/labs/bahrain/students/maryam-ali/posts/2020/05/13/week16.html</link>
        <guid isPermaLink="true">http://localhost:4000/2020/labs/bahrain/students/maryam-ali/posts/2020/05/13/week16.html</guid>
        
        <category>week 16</category>
        
        
        <category>posts</category>
        
      </item>
    
      <item>
        <title>15. Networking and communications</title>
        <description>&lt;p style=&quot;text-align: justify;&quot;&gt;
In this week I'll try two methods of communication between two nodes, 
which are the serial bus and the I2C communication protocol. 
For the group assignment, we will connect two projects together to send messages between them.
&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Softwares used:&lt;/strong&gt;&lt;/p&gt;
&lt;div id=&quot;toc_container&quot;&gt;
&lt;ul class=&quot;toc_list&quot;&gt;
&lt;li&gt;&lt;a href=&quot;https://www.arduino.cc/en/Main/Software&quot;&gt;Arduino IDE. &lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Resources:&lt;/strong&gt;&lt;/p&gt;
&lt;div id=&quot;toc_container&quot;&gt;
&lt;ul class=&quot;toc_list&quot;&gt;
&lt;li&gt;&lt;a href=&quot;http://fabacademy.org/2019/docs/FabAcademy-Tutorials/week15_networking_and_communications/helloserialbus-c.html&quot;&gt;Hello Serial Bus - Using C.&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/SpenceKonde/ATTinyCore&quot;&gt;Arduino core for ATtiny library.&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://archive.fabacademy.org/2018/labs/fablabbahrain/students/duaa-alaali/week13.html&quot;&gt;NETWORKING.&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://diyhacking.github.io/Week4/Day4/index.html&quot;&gt;Serial communication between two ATtiny boards.&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://web.engr.oregonstate.edu/~jinyo/ece375/pdf/Setup_External_programmer_in_Atmel_Studio.pdf&quot;&gt;Setup External programmer in Atmel Studio.&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;This week assignment content:&lt;/strong&gt;&lt;/p&gt;
&lt;div id=&quot;toc_container&quot;&gt;
&lt;ul class=&quot;toc_list&quot;&gt;

&lt;li&gt;&lt;a href=&quot;#First_Point_Header&quot;&gt;15.1. Group assignment.&lt;/a&gt;&lt;/li&gt;
&lt;div id=&quot;toc_container&quot;&gt;
&lt;ul class=&quot;toc_list&quot;&gt;
&lt;li&gt;&lt;a href=&quot;#Group_First_Point_Header&quot;&gt;15.1.1. Send a message between two projects.&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;

&lt;li&gt;&lt;a href=&quot;#Second_Point_Header&quot;&gt;15.2. Individual assignment.&lt;/a&gt;&lt;/li&gt;
&lt;div id=&quot;toc_container&quot;&gt;
&lt;ul class=&quot;toc_list&quot;&gt;
&lt;li&gt;&lt;a href=&quot;#Individual_First_Point_Header&quot;&gt;15.2.1. Serial Bus (Arduino UNO + ATtiny44).&lt;/a&gt;&lt;/li&gt;
&lt;div id=&quot;toc_container&quot;&gt;
&lt;ul class=&quot;toc_list&quot;&gt;
&lt;li&gt;&lt;a href=&quot;#Individual_First_First_Point_Header&quot;&gt;15.2.1.1. Step 1: Set Arduino UNO as a programmer.&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#Individual_First_Second_Point_Header&quot;&gt;15.2.1.2. Step 2: Program the ATtiny44 board.&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#Individual_First_Third_Point_Header&quot;&gt;15.2.1.3. Step 3: Program the Ardunio UNO board.&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#Individual_First_Fourth_Point_Header&quot;&gt;15.2.1.4. Step 4: Serial monitor.&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#Individual_First_Fifth_Point_Header&quot;&gt;15.2.1.5. Problem faced.&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;

&lt;li&gt;&lt;a href=&quot;#Individual_Second_Point_Header&quot;&gt;15.2.2. I2C (Arduino UNO + ATtiny44).&lt;/a&gt;&lt;/li&gt;
&lt;div id=&quot;toc_container&quot;&gt;
&lt;ul class=&quot;toc_list&quot;&gt;
&lt;li&gt;&lt;a href=&quot;#Individual_Second_First_Point_Header&quot;&gt;15.2.2.1. Step 1: Set Arduino UNO as a programmer.&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#Individual_Second_Second_Point_Header&quot;&gt;15.2.2.2. Step 2: Add the ATtiny44Core board library.&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#Individual_Second_Third_Point_Header&quot;&gt;15.2.2.3. Step 3: Program the ATtiny44 board (Master).&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#Individual_Second_Fourth_Point_Header&quot;&gt;15.2.2.4. Step 4: Program the Ardunio UNO (Slave).&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#Individual_Second_Fifth_Point_Header&quot;&gt;15.2.2.5. Step 5: I2C connection.&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#Individual_Second_Sixth_Point_Header&quot;&gt;15.2.2.6. Final result.&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#Individual_Second_Sevenith_Point_Header&quot;&gt;15.2.2.7. Problem faced.&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;


&lt;li&gt;&lt;a href=&quot;#Individual_Third_Point_Header&quot;&gt;15.2.3. I2C (ATtiny84 + ATtiny44).&lt;/a&gt;&lt;/li&gt;
&lt;div id=&quot;toc_container&quot;&gt;
&lt;ul class=&quot;toc_list&quot;&gt;
&lt;li&gt;&lt;a href=&quot;#Individual_Third_First_Point_Header&quot;&gt;15.2.3.1. Step 1: Set Arduino UNO as a programmer.&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#Individual_Third_Second_Point_Header&quot;&gt;15.2.3.2. Step 2: Program the ATtiny44 board (Master).&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#Individual_Third_Third_Point_Header&quot;&gt;15.2.3.3. Step 3: Program the ATtiny84 board (Slave).&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#Individual_Third_Fourth_Point_Header&quot;&gt;15.2.3.4. Step 4: I2C connection.&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#Individual_Third_Fifth_Point_Header&quot;&gt;15.2.3.5. Final result.&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#Individual_Third_Sixith_Point_Header&quot;&gt;15.2.3.6. Problem faced.&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;


&lt;/ul&gt;
&lt;/div&gt;

&lt;/ul&gt;
&lt;/div&gt;

&lt;hr /&gt;
&lt;h3 id=&quot;First_Point_Header&quot;&gt;15.1. Group assignment.&lt;/h3&gt;
&lt;h4 id=&quot;Group_First_Point_Header&quot;&gt;15.1.1. Send a message between two projects.&lt;/h4&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;
For this week the group assignment is to send a message between two projects.
Click &lt;a href=&quot;http://duaa.alaali.fabcloud.io/group/assignments/Embedded_Networking_and_Communications/&quot;&gt;&lt;strong&gt;here&lt;/strong&gt;&lt;/a&gt; to enter the group assignment page.
&lt;/p&gt;

&lt;hr /&gt;
&lt;h3 id=&quot;Second_Point_Header&quot;&gt;15.2. Individual assignment.&lt;/h3&gt;

&lt;p&gt;Design, build, and connect wired or wireless node(s) with network or bus addresses.&lt;/p&gt;

&lt;h4 id=&quot;Individual_First_Point_Header&quot;&gt;15.2.1. Serial Bus (Arduino UNO + ATtiny44)&lt;/h4&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;
In this example I will connect Arduino UNO to my ATtiny44 board that I have created previously in 
&lt;a href=&quot;http://fabacademy.org/2020/labs/bahrain/students/maryam-ali/posts/2020/03/08/week07.html&quot;&gt;week 7&lt;/a&gt; 
and communicate with them trough serial bus. 
Steps are explained in details below:
&lt;/p&gt;

&lt;h4 id=&quot;Individual_First_First_Point_Header&quot;&gt;15.2.1.1. Step 1: Set Arduino UNO as a programmer:&lt;/h4&gt;

&lt;div id=&quot;toc_container&quot;&gt;
&lt;ul class=&quot;toc_list&quot;&gt;
&lt;li&gt; Connect &lt;strong&gt;Arduino UNO&lt;/strong&gt; to laptop USB port through USB cable. &lt;/li&gt;
&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week15/serial_bus_1.jpeg&quot; alt=&quot;serial_bus_1&quot; /&gt;
&lt;li&gt; Click on &lt;strong&gt;File &amp;gt; Examples &amp;gt; 11.ArduinoISP &amp;gt; ArduinoISP&lt;/strong&gt;. &lt;/li&gt;
&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week15/serial_bus_2.png&quot; alt=&quot;serial_bus_2&quot; /&gt;
&lt;li&gt; Set your Board option to &lt;strong&gt;Arduino UNO&lt;/strong&gt; and choose the correct Port. &lt;/li&gt;
&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week15/serial_bus_3.png&quot; alt=&quot;serial_bus_3&quot; /&gt;
&lt;li&gt; Upload the current code. When the code is uploaded, you will get the following message:&lt;/li&gt;
&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week15/serial_bus_4.png&quot; alt=&quot;serial_bus_4&quot; /&gt;
&lt;/ul&gt;
&lt;/div&gt;

&lt;h4 id=&quot;Individual_First_Second_Point_Header&quot;&gt;15.2.1.2. Step 2: Program the ATtiny44 board:&lt;/h4&gt;

&lt;div id=&quot;toc_container&quot;&gt;
&lt;ul class=&quot;toc_list&quot;&gt;
&lt;li&gt; Connect &lt;strong&gt;ATtiny44 board&lt;/strong&gt; to &lt;strong&gt;Arduino UNO&lt;/strong&gt; through ISP connector. &lt;/li&gt; &lt;br /&gt;
&lt;br /&gt;
AVR ISP 6-pins Header layout:
&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week15/AVR-ICSP.gif&quot; alt=&quot;AVR-ICSP&quot; /&gt;

&lt;div id=&quot;toc_container&quot;&gt;
&lt;ul class=&quot;toc_list&quot;&gt;
&lt;li&gt; Arduino Pin 13 ---&amp;gt; SCK &lt;/li&gt;
&lt;li&gt; Arduino Pin 12 ---&amp;gt; MISO &lt;/li&gt;
&lt;li&gt; Arduino Pin 11 ---&amp;gt; MOSI &lt;/li&gt;
&lt;li&gt; Arduino Pin 10 ---&amp;gt; RESET &lt;/li&gt;
&lt;li&gt; Arduino 5V     ---&amp;gt; VCC &lt;/li&gt;
&lt;li&gt; Arduino Ground ---&amp;gt; GND &lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;

&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week15/serial_bus_5.jpeg&quot; alt=&quot;serial_bus_5&quot; /&gt;

&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt; Set your Board option to ATtiny44 and choose the correct Port. 
If you don't have the ATtiny44 board shown in the boards list, then you should upload its library to the boards manager 
(follow steps explained in &lt;a href=&quot;http://fabacademy.org/2020/labs/bahrain/students/maryam-ali/posts/2020/03/21/week09.html&quot;&gt;week 9&lt;/a&gt;). &lt;/p&gt; &lt;/li&gt;

&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week15/serial_bus_6.png&quot; alt=&quot;serial_bus_6&quot; /&gt;

&lt;li&gt; Upload the following code. The output is sent to &quot;PA3&quot; becuase in my ATtiny44 board, LED is connected to PA3 (physical pin: 10).&lt;/li&gt; 


&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;#include &amp;lt;SoftwareSerial.h&amp;gt;
SoftwareSerial mySerial(PA1,PA0); //RX, TX
int v=0; 
int nodeid=3;

void setup() {
  mySerial.begin(9600); 
  pinMode(PA3, OUTPUT); // white led
}

void loop() {
  while (mySerial.available () == 0 ) {}
  v = mySerial.parseInt();
  mySerial.println(v);
  if(v == nodeid)
{
  digitalWrite(PA3,HIGH);
  delay(500);
  digitalWrite(PA3,LOW);
  delay(500);
  digitalWrite(PA3,HIGH);
  delay(500);
  digitalWrite(PA3,LOW);
}
else
{
  digitalWrite(PA3,LOW);
 }
}&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;


&lt;li&gt; When the code is uploaded, you will get the following message: &lt;/li&gt;
&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week15/serial_bus_7.png&quot; alt=&quot;serial_bus_7&quot; /&gt;
&lt;/ul&gt;
&lt;/div&gt;

&lt;h4 id=&quot;Individual_First_Third_Point_Header&quot;&gt;15.2.1.3. Step 3: Program the Ardunio UNO board: &lt;/h4&gt;

&lt;div id=&quot;toc_container&quot;&gt;
&lt;ul class=&quot;toc_list&quot;&gt;
&lt;li&gt; Set your Board option to &lt;strong&gt;Arduino UNO&lt;/strong&gt; and choose the correct Port. &lt;/li&gt;
&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week15/serial_bus_3.png&quot; alt=&quot;serial_bus_3&quot; /&gt;
&lt;li&gt; &lt;p style=&quot;text-align: justify;&quot;&gt; Upload the following code. The output is sent to pin &quot;13&quot;, which is the digital pin that the on-board LED 
hard wired to. It’s the one with an “L” next to it. &lt;/p&gt; &lt;/li&gt; 


&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;int v=0; 
int nodeid=1;

void setup() {
  Serial.begin(9600); 
  pinMode(13, OUTPUT); // white led
}

void loop() {
  while (Serial.available () == 0 ) {}
  v = Serial.parseInt();
  Serial.println(v);
  if(v == nodeid)
{
  digitalWrite(13,HIGH);
  delay(500);
  digitalWrite(13,LOW);
  delay(500);
  digitalWrite(13,HIGH);
  delay(500);
  digitalWrite(13,LOW);
}
else
{
  digitalWrite(13,LOW);
 }
}&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;


&lt;li&gt; When the code is uploaded, you will get the following message: &lt;/li&gt;
&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week15/serial_bus_8.png&quot; alt=&quot;serial_bus_8&quot; /&gt;
&lt;/ul&gt;
&lt;/div&gt;

&lt;h4 id=&quot;Individual_First_Fourth_Point_Header&quot;&gt;15.2.1.4. Step 4: Serial monitor: &lt;/h4&gt;

&lt;div id=&quot;toc_container&quot;&gt;
&lt;ul class=&quot;toc_list&quot;&gt;

&lt;li&gt; Connect &lt;strong&gt;ATtiny44 board&lt;/strong&gt; bus pins to &lt;strong&gt;Arduino UNO&lt;/strong&gt; Rx, Tx, 5V, GND pins and disconnect the ISP header.&lt;/li&gt; 
&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week15/serial_bus_9.jpeg&quot; alt=&quot;serial_bus_9&quot; /&gt;

&lt;li&gt; Open the &lt;strong&gt;Serial Monitor&lt;/strong&gt; from the &lt;strong&gt;Tools&lt;/strong&gt; menu or by pressing &lt;strong&gt;Ctrl + Shift + M&lt;/strong&gt; on your keyboard. 
When the serial monitor is opened, change the &lt;strong&gt;baud rate&lt;/strong&gt; to &lt;strong&gt;&quot;9600&quot;&lt;/strong&gt;.&lt;/li&gt; 
&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week15/serial_bus_10.PNG&quot; alt=&quot;serial_bus_10&quot; /&gt;


&lt;li&gt; Type &quot;1&quot; to flash the LED on the Arduino UNO and &quot;3&quot; to flash the LED on the ATtiny44 board. &lt;/li&gt;

	
&lt;head&gt;
&lt;style type=&quot;text/css&quot;&gt;
.responsiveRapper {
	overflow:hidden;
	padding-bottom:56.25%;
	padding-top:30px;
	height:0;
	position:relative;
}
.responsiveRapper iframe,
.responsiveRapper object,
.responsiveRapper embed {
	top:0;
	left:0;
	width:100%;
	height:100%;
	position:absolute;
}
&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div class=&quot;responsiveRapper&quot;&gt;
  &lt;iframe src=&quot;https://player.vimeo.com/video/419063599&quot; width=&quot;500&quot; height=&quot;281&quot; frameborder=&quot;0&quot; webkitallowfullscreen=&quot;&quot; mozallowfullscreen=&quot;&quot; allowfullscreen=&quot;&quot;&gt;
  &lt;/iframe&gt;
&lt;/div&gt;
&lt;/body&gt;




&lt;/ul&gt;
&lt;/div&gt;

&lt;h4 id=&quot;Individual_First_Fifth_Point_Header&quot;&gt;15.2.1.5. Problem faced: &lt;/h4&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;
Both LEDs on Arduino UNO and ATtiny44 didn’t work because I have connected ATtiny44 Tx pin to Ardunio Rx pin and vice versa. 
I didn’t get an error message, but there were no physical results as well as no output on the serial monitor.
&lt;/p&gt;

&lt;hr /&gt;
&lt;h4 id=&quot;Individual_Second_Point_Header&quot;&gt;15.2.2. I2C (Arduino UNO + ATtiny44)&lt;/h4&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;
My second try for this week assignment is using &lt;strong&gt;I2C&lt;/strong&gt; communication protocol.
It stands for &lt;strong&gt;Inter-Integrated Circuit&lt;/strong&gt;. Also it's called &lt;strong&gt;2-Wire Communication&lt;/strong&gt;. 
In I2C, data are transmitted between devices using &lt;strong&gt;Serial Data Line (SDA)&lt;/strong&gt; and 
&lt;strong&gt;Serial Clock Line (SCL)&lt;/strong&gt;. It can support the communication between multiple masters and 
multiple slaves devices at the same time. 
&lt;/p&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;
To do the second test using I2C serial communication, I have used my ATtiny44 board that I have created before as a master board 
and Arduino UNO as the slave board for my program. Steps are explained below:
&lt;/p&gt;

&lt;h4 id=&quot;Individual_Second_First_Point_Header&quot;&gt;15.2.2.1. Step 1: Set Arduino UNO as a programmer: &lt;/h4&gt;

&lt;p&gt;First I set Arduino UNO as the programmer for my ATtiny44 board as explained previously in Serial Bus step 1.&lt;/p&gt;

&lt;h4 id=&quot;Individual_Second_Second_Point_Header&quot;&gt;15.2.2.2. Step 2: Add the ATtiny44Core board library: &lt;/h4&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;
To run the code, I need to install the ATtinyCore library. 
To do that, add the following URL to the board manager &quot;Additional Boards Manager URLs&quot; list.
&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;http://drazzy.com/package_drazzy.com_index.json&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;div id=&quot;toc_container&quot;&gt;
&lt;ul class=&quot;toc_list&quot;&gt;
&lt;li&gt; Go to File &amp;gt;&amp;gt; Preferences &amp;gt;&amp;gt; enter the above URL in &quot;Additional Boards Manager URLs. &lt;/li&gt;
&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week15/Preferences.png&quot; alt=&quot;Preferences&quot; /&gt;
&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week15/Preferences_URL.png&quot; alt=&quot;Preferences_URL&quot; /&gt;
&lt;li&gt; Then go to Tools &amp;gt;&amp;gt; Boards &amp;gt;&amp;gt; Boards Manager. &lt;/li&gt;
&lt;li&gt; Select &quot;ATTinyCore by Spence Konde&quot; and click &quot;Install&quot;. &lt;/li&gt;
&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week15/core.png&quot; alt=&quot;core&quot; /&gt;
&lt;li&gt; Now you should have the ATtiny44 under the ATtinyCore boards, select as your board. &lt;/li&gt;
&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week15/tinyCore.png&quot; alt=&quot;tinyCore&quot; /&gt;
&lt;/ul&gt;
&lt;/div&gt;

&lt;h4 id=&quot;Individual_Second_Third_Point_Header&quot;&gt;15.2.2.3. Step 3: Program the ATtiny44 board (Master): &lt;/h4&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;
Then connect the ATtiny44 board ISP connector to Arduino UNO as mentioned previously in Serial Bus step 2. 
Upload the following code, which tells the program to send &quot;1&quot; through I2C serial wire when the push button (connected to pin PA2) is pressed.
&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;#include &amp;lt;Wire.h&amp;gt;
#define button PA2
void setup() {
Wire.begin();
pinMode(button, INPUT);
}
void loop() {
int data;
data = digitalRead(button);
if (data == 1)
{
Wire.beginTransmission(8);
Wire.write(1);
Wire.endTransmission();
}
else {
Wire.beginTransmission(8);
Wire.write(0);
Wire.endTransmission();
}
}&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h4 id=&quot;Individual_Second_Fourth_Point_Header&quot;&gt;15.2.2.4. Step 4: Program the Ardunio UNO (Slave): &lt;/h4&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;
Upload the following code to the slave board, which tells the program to send a high signal to pin 13 (LED) of the slave board.
&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;#include &amp;lt;Wire.h&amp;gt;
#define led 13
void setup() {
Wire.begin(8);
Wire.onReceive(receiveEvent);
pinMode(led, OUTPUT);
}
void loop() {
delay(100);
}
void receiveEvent(int howMany) {
int x = Wire.read();
if (x == 1)
{
digitalWrite(led, HIGH);
}
if (x == 0)
{
digitalWrite(led, LOW);
}
}&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h4 id=&quot;Individual_Second_Fifth_Point_Header&quot;&gt;15.2.2.5. Step 5: I2C connection:  &lt;/h4&gt;

&lt;p&gt;Connect the two boards as the following configuration: 
&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week15/i2c.png&quot; alt=&quot;i2c&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; &lt;br /&gt;
Blue line is SCL &lt;br /&gt;
Green line is SDA&lt;/p&gt;

&lt;h4 id=&quot;Individual_Second_Sixth_Point_Header&quot;&gt;15.2.2.6. Final result:&lt;/h4&gt;

&lt;head&gt;
&lt;style type=&quot;text/css&quot;&gt;
.responsiveRapper {
	overflow:hidden;
	padding-bottom:56.25%;
	padding-top:30px;
	height:0;
	position:relative;
}
.responsiveRapper iframe,
.responsiveRapper object,
.responsiveRapper embed {
	top:0;
	left:0;
	width:100%;
	height:100%;
	position:absolute;
}
&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div class=&quot;responsiveRapper&quot;&gt;
  &lt;iframe src=&quot;https://player.vimeo.com/video/419471085&quot; width=&quot;500&quot; height=&quot;281&quot; frameborder=&quot;0&quot; webkitallowfullscreen=&quot;&quot; mozallowfullscreen=&quot;&quot; allowfullscreen=&quot;&quot;&gt;
  &lt;/iframe&gt;
&lt;/div&gt;
&lt;/body&gt;

&lt;h4 id=&quot;Individual_Second_Sevenith_Point_Header&quot;&gt;15.2.2.7. Problem faced:&lt;/h4&gt;
&lt;p&gt;If the ATtiny44 core library is not installed correctly, the following error message will appear:
&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week15/error.png&quot; alt=&quot;error&quot; /&gt;&lt;/p&gt;

&lt;hr /&gt;
&lt;h4 id=&quot;Individual_Third_Point_Header&quot;&gt;15.2.3. I2C (ATtiny84 + ATtiny44)&lt;/h4&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;
My third try was using the same method of communication in the second try, which is I2C. But using ATtiny84 micro-controller board that I made for 
&lt;a href=&quot;http://fabacademy.org/2020/labs/bahrain/students/maryam-ali/circuit.html#Third_First_Point_Header&quot;&gt;final project&lt;/a&gt; instead of Arduino UNO 
as the salve board.
&lt;/p&gt;

&lt;h4 id=&quot;Individual_Third_First_Point_Header&quot;&gt;15.2.3.1. Step 1: Set Arduino UNO as a programmer:&lt;/h4&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;
First I set Arduino UNO as programmer as explained previously in 
&lt;a href=&quot;http://fabacademy.org/2020/labs/bahrain/students/maryam-ali/posts/2020/05/06/week15.html#Individual_First_First_Point_Header&quot;&gt;Serial Bus step 1.&lt;/a&gt;
&lt;/p&gt;

&lt;h4 id=&quot;Individual_Third_Second_Point_Header&quot;&gt;15.2.3.2. Step 2: Program the ATtiny44 board (master):&lt;/h4&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;Connect ATtiny44 board to Arduino UNO through ISP connector as mentioned in 
&lt;a href=&quot;http://fabacademy.org/2020/labs/bahrain/students/maryam-ali/posts/2020/05/06/week15.html#Individual_First_Second_Point_Header&quot;&gt;Serial Bus step 2.&lt;/a&gt;
Set your Board option to ATtiny44, Clock to external 20 MHz, and choose the correct Port. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Connection:&lt;/strong&gt;
&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week15/serial_bus_5.jpeg&quot; alt=&quot;serial_bus_5&quot; /&gt;&lt;/p&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;
Upload the same code that was uploaded in 
&lt;a href=&quot;http://fabacademy.org/2020/labs/bahrain/students/maryam-ali/posts/2020/05/06/week15.html#Individual_Second_Third_Point_Header&quot;&gt;I2C step 3.&lt;/a&gt; 
Which tells the program to send &quot;1&quot; through I2C serial wire when the push button (connected to pin PA2) is pressed. 
&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;#include &amp;lt;Wire.h&amp;gt;
#define button PA2
void setup() {
Wire.begin();
pinMode(button, INPUT);
}
void loop() {
int data;
data = digitalRead(button);
if (data == 1)
{
Wire.beginTransmission(8);
Wire.write(1);
Wire.endTransmission();
}
else {
Wire.beginTransmission(8);
Wire.write(0);
Wire.endTransmission();
}
}&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h4 id=&quot;Individual_Third_Third_Point_Header&quot;&gt;15.2.3.3. Step 3: Program the ATtiny84 (Slave):&lt;/h4&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;
Connect ATtiny84 board to Arduino UNO through ISP connector as mentioned before. 
Upload the following code to the slave board, which tells the program to send a high signal to PA2 (LED) of the slave board.
&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Connection:&lt;/strong&gt;
&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week15/serial_bus_111.jpeg&quot; alt=&quot;serial_bus_111&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Code:&lt;/strong&gt;&lt;/p&gt;
&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;#include &amp;lt;Wire.h&amp;gt;
void setup() {
Wire.begin(8);
Wire.onReceive(receiveEvent);
pinMode(PA2, OUTPUT);
}
void loop() {
delay(100);
}
void receiveEvent(int howMany) {
int x = Wire.read();
if (x == 1)
{
digitalWrite(PA2, HIGH);
}
if (x == 0)
{
digitalWrite(PA2, LOW);
}
}&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h4 id=&quot;Individual_Third_Fourth_Point_Header&quot;&gt;15.2.3.4. Step 4: I2C connection:&lt;/h4&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;
Connect the two boards, which are the ATtiny84 and ATtin44 boards as explained previously in 
&lt;a href=&quot;http://fabacademy.org/2020/labs/bahrain/students/maryam-ali/posts/2020/05/06/week15.html#Individual_Second_Fifth_Point_Header&quot;&gt;&lt;strong&gt;15.2.2.5. Step 5: I2C connection.&lt;/strong&gt;&lt;/a&gt;
 and observe that the LED that connected to ATtiny84 will be ON when the push button on the attiny44 board is pressed. &lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week15/connection.jpeg&quot; alt=&quot;connection&quot; /&gt;&lt;/p&gt;

&lt;h4 id=&quot;Individual_Third_Fifth_Point_Header&quot;&gt;15.2.3.5. Final result:&lt;/h4&gt;

&lt;head&gt;
&lt;style type=&quot;text/css&quot;&gt;
.responsiveRapper {
	overflow:hidden;
	padding-bottom:56.25%;
	padding-top:30px;
	height:0;
	position:relative;
}
.responsiveRapper iframe,
.responsiveRapper object,
.responsiveRapper embed {
	top:0;
	left:0;
	width:100%;
	height:100%;
	position:absolute;
}
&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div class=&quot;responsiveRapper&quot;&gt;
  &lt;iframe src=&quot;https://player.vimeo.com/video/466719966&quot; width=&quot;500&quot; height=&quot;281&quot; frameborder=&quot;0&quot; webkitallowfullscreen=&quot;&quot; mozallowfullscreen=&quot;&quot; allowfullscreen=&quot;&quot;&gt;
  &lt;/iframe&gt;
&lt;/div&gt;
&lt;/body&gt;

&lt;h4 id=&quot;Individual_Third_Sixith_Point_Header&quot;&gt;15.2.3.6. Problem faced:&lt;/h4&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;
When I was trying to upload &lt;strong&gt;ArduinoISP&lt;/strong&gt; code to Arduino UNO, I got an error and the code won't uploaded.
&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week15/error_uploading.jpeg&quot; alt=&quot;error_uploading&quot; /&gt;&lt;/p&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;
To solve this problem, I have used another Arduino UNO to burn bootloader of my Arduino UNO. Connection between the two Arduino UNOs is shown below:
&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week15/ArduinoUNOtoUNO_ISP2.jpg&quot; alt=&quot;ArduinoUNOtoUNO_ISP2&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week15/connectionISP.jpeg&quot; alt=&quot;connectionISP&quot; /&gt;&lt;/p&gt;

&lt;p&gt;After burning bootloader successfully, the following message will be shown and you can use the Arduino UNO again.
&lt;img src=&quot;https://gitlab.fabcloud.org/academany/fabacademy/2020/labs/bahrain/students/maryam-ali/raw/master/assets/images/week15/burn bootloader.png&quot; alt=&quot;burn bootloader&quot; /&gt;&lt;/p&gt;

&lt;hr /&gt;
</description>
        <pubDate>Wed, 06 May 2020 19:00:47 +0300</pubDate>
        <link>http://localhost:4000/2020/labs/bahrain/students/maryam-ali/posts/2020/05/06/week15.html</link>
        <guid isPermaLink="true">http://localhost:4000/2020/labs/bahrain/students/maryam-ali/posts/2020/05/06/week15.html</guid>
        
        <category>week 15</category>
        
        
        <category>posts</category>
        
      </item>
    
  </channel>
</rss>
