Skip to content

Commit

Permalink
Merge pull request #196 from bjc-edc/middle-school
Browse files Browse the repository at this point in the history
Merging Sparks into Master for SIGCSE
  • Loading branch information
cycomachead committed Mar 23, 2024
2 parents c9d3be3 + 55d3281 commit 4fd4fa2
Show file tree
Hide file tree
Showing 125 changed files with 1,478 additions and 327 deletions.
2 changes: 1 addition & 1 deletion course/sparks-teacher.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ <h3>Teacher Resources</h3>
<div class="topic_container" novideo noassignment>
<h3>Curriculum Materials</h3>
<div class="topic_link"><a href="/bjc-r/topic/topic.html?topic=sparks/1-teaching-guide.topic" title="Unit 1 Teacher Guide: Functions and Data">Unit 1 Teacher Guide: Functions and Data</a></div>
<div class="topic_link"><a href="/bjc-r/topic/topic.html?topic=sparks/2-teaching-guide.topic" title="Unit 2 Teacher Guide: Sequencing and Iteration">Unit 2 Teacher Guide: Sequencing and Iteration</a> (under<!--TELL TONY WHEN THESE THINGS COME OUT OF DEVELOPMENT SEE 1/17/22 email--> development)</div>
<div class="topic_link"><a href="/bjc-r/topic/topic.html?topic=sparks/2-teaching-guide.topic" title="Unit 2 Teacher Guide: Sequencing and Iteration">Unit 2 Teacher Guide: Sequencing and Iteration</a><!--TELL TONY WHEN THESE THINGS COME OUT OF DEVELOPMENT SEE 1/17/22 email--></div>
<div class="topic_link"><a href="/bjc-r/topic/topic.html?topic=sparks/3-teaching-guide.topic" title="Unit 3 Teacher Guide: Hardware">Unit 3 Teacher Guide: Hardware</a></div>
</div>

Expand Down
2 changes: 1 addition & 1 deletion course/sparks.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ <h2>Beauty and Joy of Computing Sparks</h2>

<div class="topic_container">
<div class="topic_link"><a href="/bjc-r/topic/topic.html?topic=sparks/1-functions-data.topic" title="Unit 1: Functions and Data">Unit 1: Functions and Data</a></div>
<div class="topic_link"><a href="/bjc-r/topic/topic.html?topic=sparks/2-sequencing-iteration.topic" title="Unit 2: Sequencing and Iteration">Unit 2: Sequencing and Iteration</a> (under development)</div>
<div class="topic_link"><a href="/bjc-r/topic/topic.html?topic=sparks/2-sequencing-iteration.topic" title="Unit 2: Sequencing and Iteration">Unit 2: Sequencing and Iteration</a></div>
<div class="topic_link"><a href="/bjc-r/topic/topic.html?topic=sparks/3-hardware.topic" title="Unit 3: Hardware">Unit 3: Hardware</a></div>
</div>
</body>
Expand Down
Binary file added img/4-internet/redundancy-simple.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/4-internet/redundancy-simple.psd
Binary file not shown.
Binary file modified sparks/img/U2/decision-tree.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified sparks/img/U2/lab03/microphone(spectrum)-reporting.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified sparks/img/U2/lab03/oscilloscope-core-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified sparks/img/U2/lab03/oscilloscope-core-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified sparks/img/U2/lab03/samplex150.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added sparks/img/U2/lab03/show-frequencies.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed sparks/img/U2/lab03/show-volume-samples-code.png
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added sparks/img/U2/lab03/show-volume-samples.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added sparks/img/U2/lab03/spectrum-analyzer-core.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added sparks/img/U2/lab03/spectrum-analyzer.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added sparks/img/U2/lab04/attack-router.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added sparks/img/U2/lab04/cut-cable.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added sparks/img/U2/lab04/destroy-router.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added sparks/img/U2/lab04/initialize-routers.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added sparks/img/U2/lab04/router-setup.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added sparks/img/U2/lab04/router.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added sparks/img/U2/lab04/send-message.png

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Binary file added sparks/img/U2/lab05/declare-vars.png
Binary file added sparks/img/U2/lab05/generator-sample-rate.png
Binary file added sparks/img/U2/lab05/generator-sawtooth.png
Binary file added sparks/img/U2/lab05/generator-short-noise.png
Binary file added sparks/img/U2/lab05/generator-square.png
Binary file added sparks/img/U2/lab05/go-play-outside.png
Binary file added sparks/img/U2/lab05/input-humidity.png
Binary file added sparks/img/U2/lab05/input-windy.png
Binary file added sparks/img/U2/lab05/noise-watcher.png
Binary file added sparks/img/U2/lab05/pick-random-floats.png
Binary file added sparks/img/U2/lab05/pick-random-integers.png
Binary file added sparks/img/U2/lab05/play-sound-noise.png
Binary file added sparks/img/U2/lab05/play-sound-short-noise.png
Binary file added sparks/img/U2/lab05/repeated-short-noise.png
Binary file added sparks/img/U2/lab05/repeated-shorter-noise.png
Binary file added sparks/img/U2/lab05/sawtooth-sample-watcher.png
Binary file added sparks/img/U2/lab05/short-noise.png
Binary file added sparks/img/U2/lab05/shorter-noise.png
Binary file added sparks/img/U2/lab05/show-repeated-short-noise.png
Binary file added sparks/img/U2/lab05/show-short-noise.png
1 change: 1 addition & 0 deletions sparks/prog/U2/lab04/routing-protocols.xml

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion sparks/prog/U2/routing-protocols.xml

This file was deleted.

42 changes: 15 additions & 27 deletions sparks/student-pages/U2/L3/01-visualizing-sound-data.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,26 +29,21 @@ <h2>Visualizing Sound Data</h2>
</ul>
</p></div>
</div>
<div class="todo">Can we cover this here?<li><strong>2-CS-02: Design projects that combine hardware and software components to collect and exchange data.</strong> Collecting and exchanging data involves input, output, storage, and processing. When possible, students should select the hardware and software components for their project designs by considering factors such as functionality, cost, size, speed, accessibility, and aesthetics. For example, components for a mobile app could include accelerometer, GPS, and speech recognition. The choice of a device that connects wirelessly through a Bluetooth connection versus a physical USB connection involves a tradeoff between mobility and the need for an additional power source for the wireless device.</li> </div>

<div class="learn">In this activity, you will explore the sound data from your computer's microphone and learn to draw in Snap<em>!</em>.</div>

<p>
Snap<em>!</em> can access your computer's microphone, so you can create a virtual <em>oscilloscope</em> that shows how the volume detected by the microphone changes over time.<br />
<img class="indent" data-gifffer="/bjc-r/sparks/img/U2/lab03/sound-visualizer.gif" alt="animation of an oscilloscope in Snap! that looks like a rapidly changing, horizontal wavey line" title="animation of an oscilloscope in Snap! that looks like a rapidly changing, horizontal wavey line" /><br />
<img class="indent" data-gifffer="/bjc-r/sparks/img/U2/lab03/sound-visualizer-with-labels.gif" alt="animation of an oscilloscope in Snap! that looks like a rapidly changing, horizontal wavey line; the horizontal axis is labeled 'volume intensity' and the vertical axis is labeled 'time'" title="animation of an oscilloscope in Snap! that looks like a rapidly changing, horizontal wavey line; the horizontal axis is labeled 'volume intensity' and the vertical axis is labeled 'time'" /><br />
</p>

<div class="todo">Add axes to this image.</div>

<div class="vocabFullWidth">
<ul>
<li>An <strong>oscilloscope</strong> is an instrument that graphs a signal's intensity over time.</li>
<div class="sidenote"><small>Image from Wikipedia user Pittigrilli.</div>
<li>An <strong>oscilloscope</strong> is an instrument that graphs a signal's intensity over time. You'll create a sound oscilloscope that shows volume (loudness) over time.</li>
<div class="sidenote"><small>Image from Wikipedia user Pittigrilli.</small></div>
<img class="indent" src="/bjc-r/sparks/img/U2/lab03/Tektronix_Oscilloscope_475A.png" alt="real oscilloscope with many buttons and knobs and a display screen showing the plot of a wave" title="real oscilloscope with many buttons and knobs and a display screen showing the plot of a wave" />
</ul>
</div>
<div class="todo">clarify that here, our intensity is volume/loudness</div>
<div class="todo">Have PG and BH review this sound stuff. Maybe have Jens, BH, and perhaps even Della review the whole lab.</div>
<div class="endnote">
<h4><strong>Sound Waves</strong></h4>
<p>Sound is created by pressure waves traveling through a material (like air or water). When you hear music, an instrument or speaker (think of a vibrating guitar string, a vibrating drum head, or a vibrating speaker) creates waves of pressure that travel through the air to your eardrum, which transmits the signal through your nerves to your brain. Have you ever heard a sound that was so loud you could feel it? Those were pressure waves that were so big you could sense them with more than just your eardrum!</p>
Expand Down Expand Up @@ -92,16 +87,16 @@ <h4><strong><a href="#hint-microphone-test" data-toggle="collapse" title="Testin
<img class="imageRight" src="/bjc-r/sparks/img/U2/lab03/microphone-dropdown.png" alt="picture of microphone block with drop-down menu open showing seven options: volume, note, frequency, samples, sample rate, spectrum, resolution" title="picture of microphone block with drop-down menu open showing seven options: volume, note, frequency, samples, sample rate, spectrum, resolution" />
<ol style="list-style-type: lower-alpha;">
<li>
<img class="" src="/bjc-r/sparks/img/U2/lab03/microphone(volume).png" alt="microphone (volume)" title="microphone (volume)" /> reports the current volume value detected by the microphone (Try clicking it while you are making a quiet sound, a loud sound, and no sound.)<br />
<img class="inline" src="/bjc-r/sparks/img/U2/lab03/microphone(volume).png" alt="microphone (volume)" title="microphone (volume)" /> reports the current volume value detected by the microphone (Try clicking it while you are making a quiet sound, a loud sound, and no sound.)<br />
<img class="indent" src="/bjc-r/sparks/img/U2/lab03/microphone(volume)-reporting.png" alt="microphone (volume) reporting 5.4169..." title="microphone (volume) reporting 5.4169..." />
</li>
<li>
<img class="" src="/bjc-r/sparks/img/U2/lab03/microphone(samples).png" alt="microphone (samples)" title="microphone (samples)" /> reports a list of current microphone volume values sampled across a small period of time <br />
<img class="inline" src="/bjc-r/sparks/img/U2/lab03/microphone(samples).png" alt="microphone (samples)" title="microphone (samples)" /> reports a list of current microphone volume values sampled across a small period of time. <br />
<img class="indent" src="/bjc-r/sparks/img/U2/lab03/microphone(samples)-reporting.png" alt="microphone (samples) reporting" title="microphone (samples)" />
</li>
<div class="endnote">You may get zeros as output at first. It can take a moment for Snap<em>!</em> to tell your browser to tell your computer to listen to the microphone.</div>
<li>
<img class="" src="/bjc-r/sparks/img/U2/lab03/microphone(resolution).png" alt="microphone (resolution)" title="microphone (resolution)" /> reports the number of values in a <code>microphone (samples)</code> list<br />
<img class="inline" src="/bjc-r/sparks/img/U2/lab03/microphone(resolution).png" alt="microphone (resolution)" title="microphone (resolution)" /> reports the number of values in a <code>microphone (samples)</code> list. Notice that this number appears in the upper left corner of <code>microphone (samples)</code> output (shown above).<br />
<img class="indent" src="/bjc-r/sparks/img/U2/lab03/microphone(resolution)-reporting.png" alt="microphone (resolution) reporting 512" title="microphone (resolution) reporting 512" />
</li>
</ol>
Expand All @@ -112,34 +107,30 @@ <h4><strong><a href="#hint-microphone-test" data-toggle="collapse" title="Testin
<p>
In Snap<em>!</em>, you can use a sprite as a pen that draws on the stage. To create an oscilloscope, you will need to use drawing blocks. Here are a few that may come in handy:
<ul>
<li><img class="inline" src="/bjc-r/img/blocks/pen-down-full-size.png" alt="pen down" title="pen down" /> puts the sprite's pen tip down so it can draw on the stage</li>
<li><img class="inline" src="/bjc-r/img/blocks/pen-up-full-size.png" alt="pen up" title="pen up" /> picks the sprite's pen tip up so it stops drawing on the stage</li>
<li><img class="inline" src="/bjc-r/img/blocks/clear-full-size.png" alt="clear" title="clear" /> clears all pen drawings from the stage</li>
<li><img class="inline" src="/bjc-r/img/blocks/glide.png" alt="glide (1) secs to x: (0) y:(0)" title="glide (1) secs to x: (0) y:(0)" /> moves the sprite to the (<em>x</em>, <em>y</em>) position typed in the input slots</li>
<li><img class="inline" src="/bjc-r/img/blocks/pen-down-full-size.png" alt="pen down" title="pen down" /> puts the sprite's pen tip down so it can draw on the stage.</li>
<li><img class="inline" src="/bjc-r/img/blocks/pen-up-full-size.png" alt="pen up" title="pen up" /> picks the sprite's pen tip up so it stops drawing.</li>
<li><img class="inline" src="/bjc-r/img/blocks/clear-full-size.png" alt="clear" title="clear" /> clears all pen drawings from the stage.</li>
<!--<li><img class="inline" src="/bjc-r/img/blocks/go-to-x-y-0-0-full-size.png" alt="go to x: (0) y:(0)" title="go to x: (0) y:(0)" /> moves the sprite to the (<em>x</em>, <em>y</em>) position typed in the input slots.</li>-->
<li><img class="inline" src="/bjc-r/img/blocks/go-to-x-y-0-0-full-size.png" alt="go to x: (0) y:(0)" title="go to x: (0) y:(0)" /> and <img class="inline" src="/bjc-r/img/blocks/glide.png" alt="glide (1) secs to x: (0) y:(0)" title="glide (1) secs to x: (0) y:(0)" /> move the sprite to the (<em>x</em>, <em>y</em>) position typed in the input slots. (<code>go</code> does it instantly, and <code>glide</code> lets you see the movement.)</li>
</ul>
<div class="endnote">You learned about "Ways to Figure Out Snap<em>!</em> Coordinates" in <a href="/bjc-r/sparks/student-pages/U2/L2/12-choosing-click-areas.html?topic=sparks%2F2-sequencing-iteration.topic&course=middle-school.html" title="Unit 2 Lab 2 Activity 12: Choosing Your Click Areas">Lab 2 Activity 12: Choosing Your Click Areas</a></div>
</p>

<div class="todo">include a description of how to see the Snap<em>!</em> axes

<li><img class="inline" src="/bjc-r/img/blocks/go-to-x-y-0-0-full-size.png" alt="go to x: (0) y:(0)" title="go to x: (0) y:(0)" /> moves the sprite to the (<em>x</em>, <em>y</em>) position typed in the input slots</li>


</div>

<div class="forYouToDo">
<ol start="4">
<li>
Experiment with drawing on the Snap<em>!</em> stage.
<ol style="list-style-type: lower-alpha">
<li>
Make the sprite go to (0,0), clear the stage, put the pen down, and then make the sprite travel to each of these points in a row:
Make the sprite go to (0, 0), clear the stage, put the pen down, and then make the sprite travel to each of these points in a row:
<ul>
<li>(50, 154)</li>
<li>(100, 0)</li>
<li>(-31, 95)</li>
<li>(131, 95)</li>
<li>(0, 0)</li>
</ul>
What did the sprite draw?
</li>
<li>Clear the stage, and create a simple line drawing (using just a few points) that has <em>at least two separate shapes</em> by using <code>pen up</code> to stop the sprite from drawing while it moves to the second shape and then <code>pen down</code> to make the sprite start drawing when it moves again.</li>
<div class="endnote">
Expand All @@ -151,12 +142,9 @@ <h4><strong><a href="#hint-microphone-test" data-toggle="collapse" title="Testin
</div>
</ol>
</li>
<li><img class="inline" src="/bjc-r/img/icons/save-now.png" alt="Now Is a Good Time to Save" title="Now Is a Good Time to Save" /></li>
</ol>
</div>




<div class="learn">In this activity, you learned about oscilloscopes, accessed the sound data from your computer's microphone, and learned how to use the sprite to draw.</div>


Expand Down
Loading

0 comments on commit 4fd4fa2

Please sign in to comment.