PASCO Sensors:
Make sure Bluetooth turned on laptop.
Download SparkVue to student laptops. (students should be able to pull up in the browser)
https://www.pasco.com/downloads/sparkvue
Update firmware on sensor:
Directions for use: https://www.youtube.com/watch?v=2zNCCn8cKPw&t=14s
Collect, visualize, and analyze data
Learn how to set up a sensor, collect and analyze data, and save an experiment. If you are new to SPARKvue, start here!
In this tutorial, we're going to use a Wireless Temperature Sensor (PS-3201) to measure the temperature of a cup of water. If you don't have a Wireless Temperature Sensor, you can still follow the steps in this tutorial to collect data with a different Wireless sensor.
Connect the sensor
Connect the sensor to SPARKvue and select a template for displaying the data.
- On the Welcome Screen, click Sensor Data.
- Turn on the sensor by pressing the power button until the lights turn on.
- On the Sensor Data Configuration screen, check the list of available wireless devices on the left. Click the sensor that matches the device ID printed on the sensor to connect it to SPARKvue.
Tip
SPARKvue lists the sensors in order of proximity to the device running the program, so your sensor is likely at the top of the list.
- Under Templates, click Graph.
Note
For multi-measurement sensors, you can also select which measurement you want to display by selecting the box next to the measurement's name. In this case, we only have one measurement that is selected by default.
Collect data
Record a run of data and view the results on the Graph display.
- On the Experiment Screen, click Start to begin recording data.
- Place the sensor probe in a cup of water.
- Once the sensor reaches equilibrium, click Stop to finish recording data.
- Adjust the viewing area of the graph by dragging the axes. You can also click the scale-to-fit tool to automatically scale the graph.
Add a note
Add a note to a data point to add context to the graph.
- Click a data point to add a note. A selection of tools appears.
- Click the annotation tool to add an annotation to that point.
- Select the Enter Note box, then use your keyboard to type a note.
- Click OK when finished. The note appears on the graph.
Tip
Reposition the annotation by dragging the text box.
Find data coordinates
Determine the coordinates of a data point and the difference between two points on the graph.
- Click a data point to analyze.
- Click the coordinates tool . A box displaying the coordinates appears.
- Click the coordinates box, then click the delta tool . A second coordinates box appears.
- Drag the second coordinates box to a new location to determine the difference between the two points. Boxes showing the difference in y and the difference in x appear.
Collect a second run
Record a second data run and compare it to the first run.
- Click Start to begin recording a second data run. The first data run is hidden.
- Remove the Temperature Sensor probe from the water and set it on the table.
- After several minutes, click Stop to end recording data.
- In the graph legend, select the Run 1 box to make the first run visible.
Fit the data to a line
Add a linear fit to a selection of the data to find the slope and y-intercept.
- Toggle the cursor tool to selection mode .
- Drag the cursor across the graph to select a portion of the graph to analyze.
- Select the linear fit tool to fit a line to the selection. A line appears with a box displaying the slope, y-intercept, and error values.
Tip
Drag the axes to see a projection of the linear fit.
Change the units of the Time axis
Change the units of the Time measurement from seconds to minutes to make the data easier to read.
- Click the toolbar drawer to collapse the toolbar.
- Click Time (s) on the x-axis to open the X-Axis Measurement panel.
- Click the s box next to Time, then select min from the dropdown list.
Save the data
Save your experiment file to share with others.
- Click on , then select Save As.
- Create a name for your file, then save it on your device.
Tip
On mobile devices, you can directly email your file by tapping the share tool and selecting Share SPARKlab.
To open your file at a later time, click Open Saved Experiment on the Welcome Screen.
Next steps
Now that you've gone over the basics of collecting data in SPARKvue, here are some suggestions to learn more about SPARKvue:
- Explore the graph display tools.
- Explore the Experiment Screen tools.
- Build a new experiment page.
- Use the search feature at the top of this page to find a specific topic.
Create a program using sensor data
Learn how to code a simple program and use sensor data to control outputs.
In this tutorial, we're going to build a program to output a message when a light sensor detects darkness. Though this tutorial is written specifically for a light sensor, you can use alternative sensors by making some minor modifications to the code.
Set up the sensor
- Connect the sensor to SPARKvue using the Sensor Data path.
- Select the digits and graph template.
- Click the Code button to open the Code tool.
Add a block to the workspace
- Select the Logic category in the toolbox.
- Drag an if block from the toolbox to the workspace.
Modify the block
- Click the gear in the block.
- Drag the else block and connect it to the if block.
- Click the gear to close it.
Connect a second block
- Select the Logic category.
- Drag the equality block and connect it to the if block.
Create a condition using data from a sensor
- Select the Hardware category. Drag the value of block and insert it into the equality block's first space.
- Select the Math category. Drag a number block and insert it into the equality block's last space.
- Click inside the number block, then enter the number
1
. - Click the equal sign
=
, then select the less than sign<
from the list.
Create an output
- Select the Code Output category, then click Create text output.
- In the window, enter
message
, then click OK. This creates a text output block. - Drag the text output block and connect to do in the if block.
- Click inside the text block, then enter
It's dark
. - Drag another text output block and connect it to else in the if block.
Tip
Alternatively, right-click the first text output block and select Duplicate.
- Click inside the text block, then enter
It's bright
.
Create a loop
- Select the Loops category. Drag the repeat while block and place it over the if block so it surrounds the if block.
- Select the Logic category. Drag the true block and connect it to the repeat while block.
- Select the Loops category. Drag the break out of loop block and connect it to the bottom of the do statement in the if block.
- Click again to exit the Code tool.
Run the program
- In the Digits display, click the Brightness measurement.
- Select the User-entered tab, then select message.
- Click Start .
- Cover the sensor to see the message change. This also stops the program.
Tip
You can also click Stop to stop the program manually.
Next steps
Now that you've created your first program, here are some further topics you can explore to take your coding to the next step.
- Explore the Code tool features by looking at the Code tool overview.
- Learn more about how the blocks in this lesson are used, or learn about some new blocks, in the Blockly toolbox.
- If you have a //code.Node or //control.Node, import programs provided in the PASCO Code Library.
- Download a Blockly Extension experiment from the PASCO Experiment Library.
Build a custom experiment page
Create a custom experiment layout to display data and control hardware.
In this tutorial, we're going to build an experiment page from scratch. We will select a page layout, choose displays we want to use to visualize data, and select measurements we want to display.
Create a new page
Let's start by creating a new experiment page. This can be done from the Welcome Screen or Experiment Screen:
- If you're on the Welcome Screen, click Build New Experiment.
- If you're on the Experiment Screen, click New Page .
Select a layout
- Optional: If desired, click Add Background to add a custom background image to your page.
- Select a layout from the options on the right side of the screen; scroll for additional layout choices. Each layout contains one or more display elements.
Note
Some displays require a minimum size. See Display types for more information.
Connect sensors
Before you can select your displays, you need to connect each sensor you want to use in your experiment. Follow the steps below to connect a Wireless Sensor. If you have a PASPORT or Science Workshop sensor, see the Connect a sensor to SPARKvue page.
- Turn on the sensor.
- Click Bluetooth to open the Wireless Devices window.
- Select the sensor that matches the device ID printed on your sensor.
- Click Done.
Select displays and measurements
- Select a display for each area on the experiment page. If you want to leave a display element blank, click the ×.
- For each display, click Select Measurement, then select the measurement you want to display from the menu.
Tip
If you made a mistake when creating your experiment page (such as selecting the wrong layout), click New Page to start a new page. You can delete the old page by clicking Delete Page .
Collect data
After you have set up your displays, you are ready to collect data. Click Start to begin collecting data.