Skip to content

Commit

Permalink
Update TouchRead for screen on cheat sheet
Browse files Browse the repository at this point in the history
  • Loading branch information
greg-norris committed Oct 27, 2023
1 parent c807b35 commit ca5a411
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
Binary file modified .vs/due-console/v17/.wsuo
Binary file not shown.
20 changes: 19 additions & 1 deletion public/demos.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,22 @@
"Goto Loop"
]
},
{
"label": "Touch Screen",
"code": [
"# This sample reads the x & y position on a touch screen.",
"# Touch screen with finger to read",
"# BrainPad already has the required R/C",
"# Other pins need R/C to work",
"@Loop",
" x = TouchRead('x')",
" y = TouchRead('y')",
" LogLn(x)",
" LogLn(y)",
" Wait(100)",
"Goto Loop"
]
},
{
"label": "For Loop",
"code": [
Expand Down Expand Up @@ -276,7 +292,9 @@
"# TickUs()",
"# Read system ticks in microseconds",
"# TouchRead(pin) ",
"# pin: pin number - Returns: 0 = not touched or 1 = touched",
"# pin: pin number, 'x' or 'y'",
"# Pin Returns: 0 = pin not touched or pin 1 = touched ",
"# Touch Screen Returns: -1 = not touched or x and y position",
"# Trunc(number)",
"# Returns the truncated value of it's argument",
"# Version",
Expand Down

0 comments on commit ca5a411

Please sign in to comment.