122-28029 Parallax Inc, 122-28029 Datasheet - Page 313

GUIDE STUDENT SMART SENSORS

122-28029

Manufacturer Part Number
122-28029
Description
GUIDE STUDENT SMART SENSORS
Manufacturer
Parallax Inc
Datasheet

Specifications of 122-28029

Accessory Type
Manual
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
For Use With/related Products
Smart Sensors
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Contains lead / RoHS non-compliant
' values between 0 and 16, with 8 the center.
Horizontal_Placement:
' -----[ Subroutines - Disp_Cust_Char ]---------------------------------------
' This subroutine displays a custom character.
' be set to either Line0 or Line1, and the cursor variable can be set
' to a value between 0 and 15.
' LCD's custom characters and should be set to a value between 0 and 7.
Disp_Cust_Char:
' -----[ Subroutine - Arcsine ]-----------------------------------------------
' This subroutine calculates arcsine based on the y coordinate on a circle
' of radius 127.
' calling this subroutine.
Arcsine:
' -----[ Subroutine - Arccosine ]---------------------------------------------
' This subroutine calculates arccosine based on the x coordinate on a circle
' of radius 127.
' calling this subroutine.
Arccosine:
SELECT cursor
RETURN
SEROUT LcdPin, T9600,
RETURN
GOSUB Arccosine
angle = 90 - angle
RETURN
CASE 0 TO 7
CASE 8
CASE 9 TO 16
ENDSELECT
GOSUB Disp_Cust_Char
cursor = 7
GOSUB Disp_Cust_Char
cursor = 8
GOSUB Disp_Cust_Char
cursor = cursor - 1
GOSUB Disp_Cust_Char
cursor = cursor + 1
[line + cursor, custChar]
Set the side variable equal to your y coordinate before
Set the side variable equal to your x coordinate before
The custChar variable selects one of the
Chapter 7: LCD Bar Graphs for Distance and Tilt · Page 301
' Inverse sine subroutine
' Get inverse cosine
' sin(angle) = cos(90 - angle)
' Print custom character
' Cursor 0 to 7, no changes
' Cursor 8, display at 7 & 8
' Cursor 9 to 16, display 1 left
' Inverse cosine subroutine
Calls Disp_Custom_Char.
The line variable can

Related parts for 122-28029