Shop OBEX P1 Docs P2 Docs Learn Events
DEBUG array? of some sort of multi if then statements? — Parallax Forums

DEBUG array? of some sort of multi if then statements?

AndrewParsonsAndrewParsons Posts: 13
edited 2012-11-16 13:59 in BASIC Stamp
Hello Forum,

Okay so let me explain what I am trying to do. I need to display an * to show a visual from the data from an accelerometer (x and y).

So let’s say I was dead center on both x and y i would like a debug like this.


500________________1000_______________2000
| |
| |
| |
| |
| |
| * |1000
| |
| |
| |
| |
| |500
=================================

using the same diagram this would represent full tilt front left.

500________________1000_______________2000
|* |
| |
| |
| |
| |
| |1000
| |
| |
| |
| |
| |500
=================================

To simulate the accelerometer output i will be using 2 10k pot sliders scaled to 500 to 2000. As i adjust the sliders it is my hope to move the * as if falls into the different if then statements.

Please see attached for they layout and a better understanding of what i am trying to do.

Any advice to simplify this would be much appreciated.
Thanks in advance

Andrew

Comments

Sign In or Register to comment.