Skip to content

Commit

Permalink
Sparks-U3L2 added nametag activity
Browse files Browse the repository at this point in the history
  • Loading branch information
jkangEDC committed Oct 3, 2024
1 parent d937831 commit 84b4745
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions sparks/student-pages/U3/L1/02-tiny-animation.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ <h2>Tiny Animation</h2>
Create a loop to cycle through both expressions.<br/>
<img class="indent" src="/bjc-r/sparks/img/U3/L1/smile-animation.gif" alt="animation of two expressions on micro:bit" title="smiley loop" height="250">
<img src="/bjc-r/sparks/img/U3/L1/smile-animation.png" alt="code to create smiley loop" title="smiley loop code" height="300">
</li>
<div class="endnote">
<strong>Tip:</strong> Animations are a rapid sequence of images displayed in a row. To bring your face to life, you'll need to switch between <code>display</code> blocks quickly, but not too quickly. To achieve this, use a <code>wait</code> block after each <code>display</code>. Adjust with the amount of time the program waits to what you like.
</div>
<div class="endnote">
<strong>Tip:</strong> Animations are a rapid sequence of images displayed in a row. To bring your face to life, you'll need to switch between <code>display</code> blocks quickly, but not too quickly. To achieve this, use a <code>wait</code> block after each <code>display</code>. Adjust with the amount of time the program waits to what you like.
</div>
</li>
<li>
Once your animation is playing on the micro:bit, create your own animation by switching between two <code>display</code> blocks.
</li>
Expand All @@ -49,17 +49,23 @@ <h3>Make an Interactive Animation</h3>
Use an <code>if</code> block together with a <code>light level</code> block to change the image on the LED screen based on the light detected.<br/>
<img class="indent" src="/bjc-r/sparks/img/U3/L1/smiley-2.gif" alt="animation of two expressions on micro:bit" title="smiley loop" height="350">
<img class="indent" src="/bjc-r/sparks/img/U3/L1/light-level-smile.png" alt="code to create smiley loop" title="smiley loop code" height="350">
</li>
<div class="endnote">
<strong>Tip:</strong> Light levels vary greatly depending on the room that you're in, so you'll need to experiment with values for your program considers bright or dark, and you may need to change it later for a different room. One way to do this is to use the <code>say</code> block. <a href="#hint-drop" data-toggle="collapse" title="Click for a picture of how to know where a block you are dragging will drop">Click for a picture.</a>
<div id="hint-drop" class="collapse"><img class="indent" src="/bjc-r/sparks/img/U3/L1/light-level.png" alt="code for detecting the light level, using a say block and light level" title="light level" width="250"/></div>
</div>
<div class="endnote">
<strong>Tip:</strong> Light levels vary greatly depending on the room that you're in, so you'll need to experiment with values for your program considers bright or dark, and you may need to change it later for a different room. One way to do this is to use the <code>say</code> block. <a href="#hint-drop" data-toggle="collapse" title="Click for a picture of how to know where a block you are dragging will drop">Click for a picture.</a>
<div id="hint-drop" class="collapse"><img class="indent" src="/bjc-r/sparks/img/U3/L1/light-level.png" alt="code for detecting the light level, using a say block and light level" title="light level" width="250"/></div>
</div>
</li>
</ol>
</div>

<div class="ifTime show">
<ol start="6">
<li>Make a more complicated animation by adding more <code>display</code> blocks or varying the <code>wait</code> time.</li>
<li>Make a nametag:
<ol>
<li>Use some of the other blocks in the "LED Display" library to display your name on your micro:bit. You can do this one letter at a time, or scrolling across the screen.</li>
<li>Then, if you save your project to your micro:bit (your micro:bit appears as a drive on your computer), you can disconnect the micro:bit from the computer and connect a battery pack to have a portable digital nametag.</li>
</ol>
</li>
</ol>
</div>

Expand Down

0 comments on commit 84b4745

Please sign in to comment.