Elenco Snap Circuits SnapMicro ® I Standard User Manual
Page 55

54
readadc
Syntax:
READADC channel,variable
- channel is a variable or a constant that sets the input pin (1,2,or 4)
- variable is the name of the variable that holds the converted data.
Function:
Read the ADC channel (8 bit resolution) contents into variable.
Information:
The readadc command is used to read the analogue value from the micro-controller input pins 1, 2, or 4.
The readadc command converts this value to an 8-bit variable. An 8-bit resolution analogue input will
provide 256 different analogue readings (0 to 255) over the full voltage range (e.g. 0 to 4.5V). Note that
not all inputs have internal ADC capability. Use the readadc10 command to read the full 10-bit value.
Convert to Basic,
Program:
main:
readadc 1, b0
w1=b0*4
high 4
pause w1
low 4
pause w1
goto
main
Enter the flow chart shown here into the program editor then build the circuit
shown on the next page.
- 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)