Example 7: digital in data collection, Example 8: digital out, Example 9: labpro led display – Vernier LabPro User Manual

Page 94: Example 10: playing music on labpro

Advertising
background image

Revision Date: 08/02/02

LabPro Technical Manual

E-3

6HQG ^`

*HW /



*HW /



6HQG ^`

*HW /



Take a sample every .1 second, 100 times.
Retrieve temperature in Fahrenheit data to L

2

.

Retrieve time data to L

1

.

Process temperature data 35 through 45 for retrieval.
Retrieve temperature data 35 through 45 to L

3

.

Example 7: Digital In Data Collection

&OU$OO/LVWV

&OU+RPH

6HQG ^`

6HQG ^`

6HQG ^`

6HQG ^`

*HW /



*HW /



'LVS /



'LVS /



Reset LabPro. (This clears LabPro RAM.)
Turn LabPro sound on.
Set up Channel 21 (Digital In) for digital data collection.
Take a sample every .1 second, 100 times.
Retrieve collected digital data to L

2

.

Retrieve time data to L

1

.

Display collected digital data.
Display time.

Example 8: Digital Out

&OU$OO/LVWV

&OU+RPH

6HQG ^`

6HQG ^`

6HQG ^`

6HQG ^



`

6HQG ^`

'LVS

"

:+(1 6$03/,1*

"

'LVS

"

&203/(7('

"

'LVS

"

35(66 (17(5

"

'LVS

"

72 7851

"

'LVS

"

32:(5 2))

"

3DXVH

6HQG ^`

Reset LabPro. (This clears LabPro RAM.)
Turn LabPro sound on.
Turn power on if external LED is to display the Digital Out.
Set up Channel 31 (Digital Out) to output listed values to digital in
source.

Every .5 seconds send the digital out value to the digital in source.

Reset LabPro to turn power off.

Example 9: LabPro LED Display

This program is just for fun. It makes LabPro’s lights blink on and off.

 )RU 0

 )RU 1

 6HQG ^1`

 (QG

 )RU 1

 6HQG ^1`

 (QG

 (QG

Repeat 10 times to make the lights flicker on and off.

Turn all three lights on.

Turn all three lights off.

Example 10: Playing Music on LabPro

This program plays “We Wish You a Merry Christmas.”

.

^ . ..... .

K = 0.15 second
Play the short notes for 0.15 seconds and the long

Advertising