<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: aliaa gheis</title>
    <description>The latest articles on DEV Community by aliaa gheis (@aliaagheisx).</description>
    <link>https://dev.to/aliaagheisx</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1005679%2F0f26792c-1643-4bb0-a631-dbcf95da5b73.jpeg</url>
      <title>DEV Community: aliaa gheis</title>
      <link>https://dev.to/aliaagheisx</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/aliaagheisx"/>
    <language>en</language>
    <item>
      <title>My Journey with Failures (Microprocessor Project Edition)</title>
      <dc:creator>aliaa gheis</dc:creator>
      <pubDate>Fri, 01 Sep 2023 23:30:13 +0000</pubDate>
      <link>https://dev.to/aliaagheisx/my-journey-with-failures-microprocessor-project-edition-2h8c</link>
      <guid>https://dev.to/aliaagheisx/my-journey-with-failures-microprocessor-project-edition-2h8c</guid>
      <description>&lt;h2&gt;
  
  
  فشلى فى مشروع المايكرو
&lt;/h2&gt;

&lt;p&gt;LinkedIn is often filled with success stories, achievements, and positivity. However, I believe that failure is the first step to success.  &lt;/p&gt;

&lt;p&gt;Over the past few months, I've come to realize that failure, the stumbling block that seems to close doors, is actually the pathway to discovering new opportunities and creativity.&lt;/p&gt;

&lt;p&gt;With this in mind, I've decided to kick off a series of posts where I'll discuss my failures – instances where I didn't necessarily reach a solution or succeed.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;It's my attempt to express gratitude for my failures, the ones that I often curse and yet endure. &lt;/p&gt;

&lt;p&gt;محاولة مني بسيطة لشكر فشلي اللي دايما بشتمه ومع ذلك مستحملني &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Let's dive into my journey by starting with a significant experience from my college semester – the Microprocessor Project.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Epic Microprocessor Project
&lt;/h2&gt;

&lt;p&gt;[Briefly, the project was a robot game competition between teams. The robots should play each other in 5 games (maze - darts - ball collecting - shooting - defending goal )]&lt;/p&gt;

&lt;p&gt;My team was in charge of the Ball Collecting Game. In this game, a robot had to pick up either red or blue balls, but it would get in trouble if it picked the wrong color. The robot also had to come back to a specific spot within four minutes.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--1uNbo2JY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ch3jku0q91vgzgxpj39i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--1uNbo2JY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ch3jku0q91vgzgxpj39i.png" alt="Image description" width="800" height="589"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The project's problems seemed to have a life of their own, tangled up in a web that had nothing to do with the project itself.&lt;/p&gt;

&lt;p&gt;كانت الدروس المستفادة من المشروع كثيرة، ولكن الأهم منها كان أني أدركت&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;أن وجود حلاً لمشكلة لا يعني بالضرورة حل المشكلة نفسها&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;أصبح واضحً ليا أن بعض المشاكل ممكن تتفكك وتكشف مشكاكل جديدة تمامًا&lt;/p&gt;

&lt;p&gt;حقيقة جزء مني كان خايف يبدأ بحكاية المشروع ده فمعرفش اعبر عنه 😂 &lt;/p&gt;

&lt;p&gt;Nevertheless, I would like to discuss how I learned from my failures, both those that preceded the project and those that occurred during it.&lt;/p&gt;




&lt;h2&gt;
  
  
  1. First Failure: I Failed to Recognize Some of My Stumbling Blocks
&lt;/h2&gt;

&lt;p&gt;فشلت في ادراك ان ليه مضغوطة/مزنوقة/مش لاقية حل &lt;/p&gt;

&lt;h3&gt;
  
  
  Health
&lt;/h3&gt;

&lt;p&gt;صحتي كانت بنسبالي الاجابة البعيدة جدا للسؤال &lt;/p&gt;

&lt;p&gt;But the project was an exception; as it was very dynamic (compared to the software projects that I used to)&lt;/p&gt;

&lt;p&gt;المشروع كان في مشواير بتتعمل وحركة ونزول علي الارض وشيل &lt;/p&gt;

&lt;p&gt;This eventually resulted in chronic pain in my back and knees, which I hadn't considered in terms of my health back then.&lt;/p&gt;

&lt;p&gt;But the stress that comes from the pains led to wrong decisions led to more stress.&lt;/p&gt;

&lt;p&gt;🥲 &lt;/p&gt;

&lt;p&gt;Thankfully, I've come to recognize the importance of prioritizing my health, and I now make more efforts to take better care of myself.&lt;/p&gt;

&lt;h3&gt;
  
  
  Slowness toward taking action
&lt;/h3&gt;

&lt;p&gt;وتاني السبب كان الأنجاز &lt;/p&gt;

&lt;p&gt;انا بعد المشروع ده سرعة انجازي علي ما اعتقد اضربت في اتنين &lt;/p&gt;

&lt;p&gt;This project, with its numerous potential failures and experiments, required quick thinking and a faster assessment of risks. It pushed me beyond the boundaries of what I was accustomed to.&lt;/p&gt;

&lt;p&gt;ولأن أن وقت المشروع الواحد متقسم علي خمس تيمات مش تيم واحد&lt;/p&gt;

&lt;p&gt;(as there are 5 sub-teams that should do different things inside the main team with only one robot)  &lt;/p&gt;

&lt;p&gt;(🫠)&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Failed to understand wheels (Wheels, Ya Wheels!)
&lt;/h2&gt;

&lt;p&gt;مشاكل العجل بدأت معانا من بدري  &lt;/p&gt;

&lt;p&gt;وتقريبا مسمعتمش عن تيم محكاش عن العجل ومشاكله &lt;/p&gt;

&lt;p&gt;المشروع كان كبير كحجم روبوت فكان في مشاكل كتير بخصوص العجل و حركة الروبوت&lt;/p&gt;

&lt;h3&gt;
  
  
  Explain My Team's problem with wheels
&lt;/h3&gt;

&lt;p&gt;Our initial wooden base robot was too thin as the thickness (as far as I remember) was 5mm, causing it to tilt slightly under load. Additionally, not everything was placed in the optimal position. This imbalance stopped the robot from spinning around itself properly.&lt;/p&gt;

&lt;p&gt;For the robot to move as intended, the right wheels needed to move in the opposite direction of the left wheels, or vice versa.&lt;/p&gt;

&lt;p&gt;Due to the varying weight distribution among the wheels, the robot didn't spin as expected. Instead, it moved with a twist, and sometimes failed to move in a straight line.&lt;/p&gt;

&lt;p&gt;First, we addressed this issue by adding a support wheel in coordinates that provided assistance to the weaker wheels through experimentation, as their positions changed periodically.&lt;/p&gt;

&lt;p&gt;We also suspected that friction existed between the wheels and the robot chassis. (I broke some of the chassis to create a breathable area between them) &lt;/p&gt;

&lt;p&gt;We ended up changing the entire base of the robot just two days before the deadline &lt;/p&gt;

&lt;p&gt;Initially, everything seemed to be working fine. However, we eventually realized that there might be a noise issue with the wires of the wheels' drivers (not entirely sure). 🥹&lt;/p&gt;

&lt;p&gt;It's funny because if we stopped one wheel, the other would stop too.&lt;/p&gt;

&lt;p&gt;“Sadly or &lt;u&gt;thankfully&lt;/u&gt; we &lt;u&gt;didn’t have the time&lt;/u&gt;  to determine the exact cause of the problem. Although we suspected the drivers and even replaced them, But the problem kept going.” &lt;/p&gt;

&lt;h2&gt;
  
  
  Third Problem (Scanning The Field)
&lt;/h2&gt;

&lt;p&gt;Since I started this conversation with the theme of creativity and failure, I aimed to make the last problem be solved by a creative idea.&lt;/p&gt;

&lt;p&gt;One of the tasks in Ball Collecting is to scan the field and collect blue balls.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--cm6IZXtG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q00nijklw8xzdv24dlcf.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--cm6IZXtG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q00nijklw8xzdv24dlcf.jpeg" alt="Image description" width="800" height="614"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this paragraph, I will discuss the different ideas and challenges we encountered on our journey towards the final result (which turned out to be a failure).&lt;/p&gt;

&lt;h3&gt;
  
  
  First idea (expensive sensor)
&lt;/h3&gt;

&lt;p&gt;We began by using a sensor to achieve Dead reckoning (it's a process for calculating exactly your position by using your previous position) &lt;/p&gt;

&lt;p&gt;I'm not sure why I insisted at that time on using the (MPU 9250) sensor, which was quite expensive, even though there was a cheaper sensor with similar capabilities. I recall having reasons  &lt;/p&gt;

&lt;p&gt;Let's focus on the key points. The sensor calculates three things: &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Acceleration &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Angular velocity &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Magnetic inclination &lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The sensor could be communicated with using both I2C and SPI communication protocols.&lt;/p&gt;

&lt;p&gt;Summarizing three challenging days with no sleep: The sensor was extremely sensitive to noise. At times, I had to move my laptop and mobile devices away to obtain measurements that somewhat made sense.&lt;/p&gt;

&lt;p&gt;Funny thing, I insisted on the project manager that we should purchase this sensor. I had watched a video, which (in my opinion) had the most silly and frustrating intro that took up 90% of the video so I decided to ignore it;  At the end of the video mentioned the summary of all my suffering that it's impossible to achieve (Dead reckoning) using MPU :sad&lt;/p&gt;

&lt;p&gt;Here's a link to the video; I challenge you to watch it until the end:&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/pbxJAuhFizg"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Nevertheless, I didn't give up. I had a suspicion that the sensor was defective when we purchased it. So, I attempted to run a ROS program on it to simulate the sensor's movement. Unfortunately, this ended up damaging the sensor (I believe only the I2C was the only thing affected, but I didn't attempt further testing).&lt;/p&gt;

&lt;h3&gt;
  
  
  Second Idea (A Stupid Ultrasonic)
&lt;/h3&gt;

&lt;p&gt;IDK who came up with this rather silly idea 🙄. In my defense :&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;يأننا كنا في عرض اي فكرة&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Here's a simplified explanation of the idea: The field was enclosed by a wall, and we knew the precise dimensions between the balls and the wall.&lt;/p&gt;

&lt;p&gt;The concept was to initiate rotation when the distance between the robot and the wall was 10 cm. As the distance increased and then decreased, it would signal the completion of half a 45-degree revolution. Then, the robot would start rotating again to reach 90 degrees and begin scanning the next line, and so on.&lt;/p&gt;

&lt;p&gt;I don't need to tell you that this approach failed miserably جداااا 🤣 &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--H6BE0z7w--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4l4sjvf10rvglk4rydlz.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--H6BE0z7w--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4l4sjvf10rvglk4rydlz.jpeg" alt="Image description" width="800" height="464"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The outcome:&lt;/p&gt;

&lt;p&gt;At that moment, we had no idea whether the robot was heading toward the stairs &lt;/p&gt;


&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
      &lt;div class="c-embed__cover"&gt;
        &lt;a href="https://www.youtube.com/shorts/PsyR3RMX-e4" class="c-link s:max-w-50 align-middle" rel="noopener noreferrer"&gt;
          &lt;img alt="" src="https://res.cloudinary.com/practicaldev/image/fetch/s--k44HnNKl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://i.ytimg.com/vi/PsyR3RMX-e4/hq2.jpg%3Fsqp%3D-oaymwEoCOADEOgC8quKqQMcGADwAQH4AYgCgALgA4oCDAgAEAEYZSBOKD0wDw%3D%3D%26rs%3DAOn4CLBNbzGyjRqKDQc8jY2hoU4vk2m_mA" height="360" class="m-0" width="480"&gt;
        &lt;/a&gt;
      &lt;/div&gt;
    &lt;div class="c-embed__body"&gt;
      &lt;h2 class="fs-xl lh-tight"&gt;
        &lt;a href="https://www.youtube.com/shorts/PsyR3RMX-e4" rel="noopener noreferrer" class="c-link"&gt;
          Ultrasonic Rotation - YouTube
        &lt;/a&gt;
      &lt;/h2&gt;
        
      &lt;div class="color-secondary fs-s flex items-center"&gt;
          &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://res.cloudinary.com/practicaldev/image/fetch/s--Wd2tTYlJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://www.youtube.com/s/desktop/fc8159e8/img/favicon.ico" width="16" height="16"&gt;
        youtube.com
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;


&lt;h3&gt;
  
  
  The Third And Successful Solution
&lt;/h3&gt;

&lt;p&gt;(Thankfully, the only approach that worked perfectly) &lt;/p&gt;

&lt;p&gt;We decided to utilize the IMU sensor inside a smartphone. Since we were already using the phone's camera to detect the color of the balls,&lt;/p&gt;

&lt;p&gt;(it only measures rotation correctly)  &lt;/p&gt;

&lt;p&gt;I'll let your eyes enjoy the perfect 90 degrees &lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/rdxAZHAzNME"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  Final Note: Yet Another Failure
&lt;/h3&gt;

&lt;p&gt;Last Note: it also failed, As the phone should be positioned at a 90-degree angle to measure the degree, Moreover the holder broke when we delivered the game.&lt;/p&gt;

</description>
      <category>learning</category>
      <category>showdev</category>
      <category>motivation</category>
    </item>
  </channel>
</rss>
