Elenco Snap Circuits SnapMicro ® I Standard User Manual
Page 60

59
Voltmeter Program;
Make sure baud rate is at 2400 when using terminal window.
The variable w5 stores the reading between 0000 and 1023 that represents the reference voltage. If the
battery voltage equals 4.5 volts and the reference voltage equals .74 volts the w5 variable should read
(.74/4.5)x1023 or 168 (decimals not allowed). The highest number the micro-controller can use
mathematically is 65,335. If the highest number for w5 is 1023, multiplying by 60 will not exceed this limit
(1023x60=61,380). These larger numbers allow for two decimals in the final reading. The program then
calculates the voltage at pin 2 using the number 80 for w6 as follows … w2=(w5 x 60) / w6 or VR =
(168 x 60) / 80 or 126. Since the reference voltage is 74 (or .74 volts), the variable w6 is increased by 1
and the calculation is repeated. When the 74 number is calculated the variable w6 has been found and
the micro-controller uses the 1 pin to measure voltages.
By comparing the input voltages to a known reference many undesired variables can be eliminated.
- Upgrade Kit SC100 to SC300 (76 pages)
- Snap Circuits Jr.® Educational 100 Exp. (48 pages)
- Upgrade Kit SC300 to SC500 (64 pages)
- Snap Rover ® (24 pages)
- XP&trade (64 pages)
- Snap Circuits LIGHT ® (84 pages)
- Snap Circuits Extreme® Educational 750 Exp. (88 pages)
- Projects PC1-PC73 (60 pages)
- Electronics 202 (132 pages)
- Snaptricity® (92 pages)
- Upgrade Kit SCROV10 to SCROV50 (48 pages)
- Snap Circuits Green ® (80 pages)
- C Adapter for Snap Circuits® (2 pages)
- Motion Detector Kit (20 pages)
- Digital Roulette Kit (16 pages)
- FM Wireless Microphone Kit (12 pages)
- AM Radio Kit (32 pages)
- AM Radio Kit (36 pages)
- AM/FM Radio Kit (64 pages)
- Circuit Maker Skill Builder 125 (64 pages)
- Circuit Maker Sound Plus 200 (80 pages)
- Understanding Logic Gates (16 pages)
- Understanding Logic Gates and Circuits (42 pages)
- Tumbling Robot (12 pages)
- Solar Energy (16 pages)
- C2D Scope (16 pages)
- 288x Astrolon Telescope with Aluminum Tripod (1 page)
- Simulated Frog Dissection Kit (1 page)
- Talking Galaxy Planetarium with Night Light (1 page)
- Night’n Day® (10 pages)
- Radio Controlled Black Widow (1 page)
- Handheld Microscope (2 pages)
- Water Filtration Kit (8 pages)
- 6-in-1 Solar Kit (18 pages)
- Microscope Set in Carrying Case (1 page)
- Mobile 20 Telescope (1 page)
- Mechanical Drum (20 pages)
- Aerial Screw (20 pages)
- Swing Bridge (20 pages)
- Printing Press (24 pages)
- MultiBarrel Cannon (20 pages)
- Armored Car (24 pages)
- Paddleboat (20 pages)
- SelfPropelled Cart (20 pages)
- Catapult (24 pages)