28029 Parallax Inc, 28029 Datasheet - Page 311

KIT PARTS SMART SENSORS W/TEXT

28029

Manufacturer Part Number
28029
Description
KIT PARTS SMART SENSORS W/TEXT
Manufacturer
Parallax Inc
Datasheet

Specifications of 28029

Accessory Type
Parts Kit
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
For Use With/related Products
BASIC Stamp® or Javelin Modules
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Contains lead / RoHS non-compliant
Other names
28029PAR
' -----[ Initialization ]-----------------------------------------------------
PAUSE 100
SEROUT LcdPin, T9600, [LcdOn, LcdCls]
PAUSE 5
' -----[ Main Routine ]-------------------------------------------------------
DO
LOOP
' -----[ Subroutines - Bar_Graph_H_V ]---------------------------------------
' Defines and displays two axis bar graph characters based on the value of
' the cursor (0 to 16) and value (1 to 31).
' Horizontal_Placement.
Bar_Graph_H_V:
PULSIN 6, 1, x
PULSIN 7, 1, y
x = (x MIN 1875 MAX 3125) - 1875 ** 13369 - 127
y = (y MIN 1875 MAX 3125) - 1875 ** 13369 - 127
side = x
GOSUB Arcsine
' Int[65536 * (31 / (181 - 1))] = 11286
value = angle + 90 ** 11286 + 1
side = y
GOSUB Arcsine
' Int[65536 * (17 / (181 - 1))] = 6189
cursor = 16 - (angle + 90 ** 6189)
GOSUB Bar_Graph_H_V
SEROUT 14, 84, [LcdCls]
PAUSE 5
' Decide whether to display on Line 0 or Line 1.
IF value >= 16 THEN line = Line0 ELSE Line = Line1
GOSUB Def_Vert_Bar_Char
GOSUB Horizontal_Placement
IF value = 16 THEN
Chapter 7: LCD Bar Graphs for Distance and Tilt · Page 299
' Call Bar_Graph_H_V
' Debounce power supply
' Initialize LCD
' 5 ms delay for clearing display
' Main loop
' Repeat main loop
Calls Def_Vert_Bar_Char, and
' Clear previous plot
' 5 ms delay for clearing display
' Define custom character
' Special case: value = 16

Related parts for 28029