Skip to content
Snippets Groups Projects
Commit dc38a83f authored by Zihao Lin's avatar Zihao Lin
Browse files

Update week_11.html

parent 49f7c13d
No related branches found
No related tags found
No related merge requests found
......@@ -117,41 +117,7 @@
At first, I used the Arudino UNO to control the stepping motor to practice the output drivers. Connection line as shown:</p>
<p style="text-align:center"><img src="img/week_11/Picture01.jpg" class="img-responsive" alt="..."></p><br/>
<p>
The pin 8 in UNO board connection the IN1 in ULN2003, the pin 9 in UNO board connection the IN2 ULN2003, the pin 10 in UNO board connection the IN3 ULN2003, the pin 11 in UNO board connection the IN4 ULN2003. Then I programed in the Ardino.<br/>
<code>
#include<Stepper.h><br/>
<br/>
const int STEPS_PER_ROTOR_REV = 32; <br/>
const int GEAR_REDUCTION = 64;<br/>
const float STEPS_PER_OUT_REV = STEPS_PER_ROTOR_REV * GEAR_REDUCTION;<br/>
int StepsRequired;<br/>
Stepper steppermotor(STEPS_PER_ROTOR_REV, 8, 10, 9, 11); <br/>
<br/>
void setup()<br/>
{<br/>
<br/>
}<br/>
<br/>
void loop()<br/>
{<br/>
steppermotor.setSpeed(1); <br/>
StepsRequired = 4;<br/>
steppermotor.step(StepsRequired);<br/>
delay(1000);<br/>
<br/>
StepsRequired = STEPS_PER_OUT_REV; <br/>
steppermotor.setSpeed(500); <br/>
steppermotor.step(StepsRequired);<br/>
delay(1000);<br/>
<br/>
StepsRequired = - STEPS_PER_OUT_REV; <br/>
steppermotor.setSpeed(800); <br/>
steppermotor.step(StepsRequired);<br/>
delay(2000);<br/>
<br/>
}<br/>
</code>
</p>
The pin 8 in UNO board connection the IN1 in ULN2003, the pin 9 in UNO board connection the IN2 ULN2003, the pin 10 in UNO board connection the IN3 ULN2003, the pin 11 in UNO board connection the IN4 ULN2003. Then I programed in the Ardino.</p>
<iframe width="691" height="640" src="https://www.youtube.com/embed/VykQHUjbDeE" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe><br/>
<div class="text-center">
<div class="section-title center" >
......@@ -213,7 +179,7 @@
</div>
</div>
<p>
This week I did some small mistake, so it took me a lot of times. The first time I laid out the plates and processed them, I found that some parts were not cut in place.<br/>
This week I did some small mistake, so it took me a lot of times. The first time I laid out the plates and processed them, I found that some parts were not cut in place.</p>
<p style="text-align:center"><img src="img/week_11/Picture05.jpg" class="img-responsive" alt="..."></p><br/>
<p style="text-align:center"><img src="img/week_11/Picture06.jpg" class="img-responsive" alt="..."></p><br/>
After that, line correction was carried out through GIMP, as shown in the following figure.<br/>
......@@ -227,17 +193,15 @@
<p style="text-align:center"><img src="img/week_11/Picture12.jpg" class="img-responsive" alt="..."></p><br/>
Then I soldered the necessary components on my board.<br/>
<p style="text-align:center"><img src="img/week_11/Picture13.jpg" class="img-responsive" alt="..."></p><br/>
</p>
<div class="text-center">
<div class="section-title center" >
<h4><strong>Programming</strong></h4>
</div>
</div>
<p>
I used the USBtiny board to program my board and I used the Arudino UNO to provide the power of 5V. I used Neil's c code and made file to program the board and saved them in a specific directory inside the Desktop. I opened Git Bash and went inside the directory where the c code and the make file where located. Then, I ran the following commands:<br/>
I used the USBtiny board to program my board and I used the Arudino UNO to provide the power of 5V. I used Neil's c code and made file to program the board and saved them in a specific directory inside the Desktop. I opened Git Bash and went inside the directory where the c code and the make file where located. Then, I ran the following commands:</p>
<code>make -f hello.RGB.45. make program-usbatiny</code><br/>
<p style="text-align:center"><img src="img/week_11/Picture14.jpg" class="img-responsive" alt="..."></p><br/>
</p>
<div class="text-center">
<div class="section-title center" >
<h4><strong>The RGB show</strong></h4>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment