-->
How do I use make an accelerometer work with the link port?
-->
-->
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
-->
Home
About
Team
Rules
Stats
Status
Sitemap
Chat
Downloads
Forum
News
Our Projects
Major Community Projects
Recent Posts
Unread Posts
Replies
Tools
SourceCoder3
Other Things...
Omnimaga Radio
TI-83 Plus ASM File Unsquisher
Z80 Conversion Tools
IES TI File Editor
Free RAM areas
Comprehensive Getkeyr table
URL Shortener
Online Axe Tilemap Editor
Help
Contact Us
Change Request
Report Issue/Bug
Team
Articles
Members
View the memberlist
Search For Members
Buddies
Login
Register
Omnimaga
»
Forum
»
General Discussion
»
Technology and Development
»
Other
»
How do I use make an accelerometer work with the link port?
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: How do I use make an accelerometer work with the link port? (Read 3669 times)
0 Members and 1 Guest are viewing this topic.
Deep Toaster
So much to do, so much time, so little motivation
Administrator
LV13
Extreme Addict (Next: 9001)
Posts: 8217
Rating: +758/-15
How do I use make an accelerometer work with the link port?
«
on:
October 12, 2012, 11:00:09 pm »
While looking through my older projects, I realized there was something I'd always wanted to do—make
PapiJump
work with an accelerometer so I could tilt it back and forth like an iPhone. I have plenty of wires and stuff that I could use, but the problem is that I know absolutely nothing about hardware.
happybobjr posted some info
in the topic
, but I have no idea what those terms mean—what's "left," "right," and "ground"? I can't learn from Google either, because I don't even know what to start searching for
What do I do with the link port to let me read values from it in a program?
«
Last Edit: October 12, 2012, 11:04:47 pm by Deep Thought
»
Logged
thepenguin77
z80 Assembly Master
LV10
31337 u53r (Next: 2000)
Posts: 1594
Rating: +823/-5
The game in my avatar is bit.ly/p0zPWu
Re: How do I use make an accelerometer work with the link port?
«
Reply #1 on:
October 12, 2012, 11:34:08 pm »
First, a little terminology, the plug that plugs into the link port is composed of 3 parts, the sleeve, the ring, and the tip. The sleeve, (the part closest to the wire) is electronic ground (0V). The other two (the ring and the tip) are both data lines. By default these sit at 3V.
Ok, so when you open up calcsys and look at port (00h), you'll notice that it reads 03. It's reading 3 because both the tip and the ring are at 3 volts (the tip is bit 0 and the ring is bit 1).
Now, a pair of headphones is basically a short circuit from both the tip and ring to the sleeve. In normal operation the tip goes to the left earphone and then to ground and the ring goes to the right earphone and then to ground. But, the main point I'm trying to get across here is that the headphones lower both the tip and the ring to 0V. So now, to see what I'm talking about, you can plug a pair of headphones into your calculator and you'll notice that port (00h) now reads 00 (and your calculator is relatively frozen).
The basic idea here is that when disconnected, both the tip and the ring will gives 1's over port (00h). But when you connect them to ground (the sleeve), they will read 0.
Now that that's out of the way, you can start messing around with your accelerometer. The basic idea here is that when your accelerometer is tilted to the left, it will connect the ring to ground and when it is tilted to the right, it will connect the tip to ground (you can swap left/right ring/tip). The way to do this is up to you, but the simplest way would simply be a marble in a tube that connects the circuit when it reaches either end.
Edit:
In axe, you can read the value of port (00h) by using the "Port" command (ClrTable).
«
Last Edit: October 12, 2012, 11:36:25 pm by thepenguin77
»
Logged
+1/-0 karm for this message
zStart v1.3.013
9-20-2013
All of my utilities
TI-Connect Help
You can build a statue out of either 1'x1' blocks or 12'x12' blocks. The 1'x1' blocks will take a lot longer, but the final product is worth it.
-Runer112
Deep Toaster
So much to do, so much time, so little motivation
Administrator
LV13
Extreme Addict (Next: 9001)
Posts: 8217
Rating: +758/-15
Re: How do I use make an accelerometer work with the link port?
«
Reply #2 on:
October 12, 2012, 11:50:08 pm »
So port 0 basically has bit 0 set if the tip is connected to the sleeve and bit 1 set if the ring is connected to the sleeve?
Thanks a lot!
«
Last Edit: October 12, 2012, 11:50:40 pm by Deep Thought
»
Logged
DrDnar
LV7
Elite (Next: 700)
Posts: 546
Rating: +97/-1
Re: How do I use make an accelerometer work with the link port?
«
Reply #3 on:
October 13, 2012, 02:00:18 am »
Yeah, it's pretty simple. You can also monitor switches and drive small
relays
from the link port.
One addendum: The correct link voltage is 3.3 V OR 5.0 V. The higher voltage is used only on the early TI-83+ models. But frying newer calculators isn't an issue; modern calculators probably tolerate up to at least 6 or so volts.
Kerm already implemented
a similar idea for an Etch-a-Sketch
.
Also, you can control many Canon and Pentax dSLRs from your calculator---and others with an adapter---cf.
my program
and
a less accurate method for the TI-83+
.
«
Last Edit: October 13, 2012, 02:24:42 am by DrDnar
»
Logged
"No tools will make a man a skilled workman, or master of defense, nor be of any use to him who has not learned how to handle them, and has never bestowed any attention upon them. . . . Yes, [] the tools which would teach men their own use would be beyond price."—Plato's
The Republic
, circa 380 BC
Keoni29
LV11
Super Veteran (Next: 3000)
Posts: 2466
Rating: +291/-16
Re: How do I use make an accelerometer work with the link port?
«
Reply #4 on:
October 18, 2012, 05:06:20 am »
You can make a two wire serial protocol to communicate with a microcontroller. You could use a microcontroller simillar to an arduino board as a buffer which gathers information from an accelerometer and send it to the calculator on demand.
Edit: This might work for you as well:
T G R
| | |
| | |
| | |
| | |
T=tip
G=ground
R=ring
The | lines connected to tip and ring are metal plates. The line | connected to ground is a little rod which can move freely. Mount this to the back of your calc. Every time the wire shorts either tip or ring to ground you can read change in the port state.
«
Last Edit: October 18, 2012, 05:10:32 am by Keoni29
»
Logged
If you like my work: why not
give me an internet?
Deep Toaster
So much to do, so much time, so little motivation
Administrator
LV13
Extreme Addict (Next: 9001)
Posts: 8217
Rating: +758/-15
Re: How do I use make an accelerometer work with the link port?
«
Reply #5 on:
November 10, 2012, 07:43:07 pm »
Thanks for the help everyone! Here's what I ended up with:
http://ourl.ca/5580/268974/
Logged
Print
Pages: [
1
]
Go Up
« previous
next »
Omnimaga
»
Forum
»
General Discussion
»
Technology and Development
»
Other
»
How do I use make an accelerometer work with the link port?
\n\t\t\t\t\t\t\t\t\t
<' + '/div>\n\t\t\t\t\t\t\t\t\t
%body%<' + '/textarea>
\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
Max characters: 20000; characters remaining:
...<' + '/span><' + '/span>
\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t<' + '/div>\n\t\t\t\t\t\t\t\t<' + '/div>', sTemplateSubjectEdit: '
', sTemplateBodyNormal: '%body%', sTemplateSubjectNormal: '
%subject%<' + '/a>', sTemplateTopSubject: 'Topic: %subject% (Read 3669 times)', sErrorBorderStyle: '1px solid red' }); aJumpTo[aJumpTo.length] = new JumpTo({ sContainerId: "display_jump_to", sJumpToTemplate: "
Jump to:<" + "/label> %dropdown_list%", iCurBoardId: 145, iCurBoardChildLevel: 1, sCurBoardName: "Other", sBoardChildLevelIndicator: "==", sBoardPrefix: "=> ", sCatSeparator: "-----------------------------", sCatPrefix: "", sGoButtonLabel: "go" }); aIconLists[aIconLists.length] = new IconList({ sBackReference: "aIconLists[" + aIconLists.length + "]", sIconIdPrefix: "msg_icon_", sScriptUrl: smf_scripturl, bShowModify: true, iBoardId: 145, iTopicId: 17205, sSessionId: "902d8d2deb6ffbe51a8c2439237993d4", sSessionVar: "faa75c3", sLabelIconList: "Message Icon", sBoxBackground: "transparent", sBoxBackgroundHover: "#ffffff", iBoxBorderWidthHover: 1, sBoxBorderColorHover: "#adadad" , sContainerBackground: "#ffffff", sContainerBorder: "1px solid #adadad", sItemBorder: "1px solid #ffffff", sItemBorderHover: "1px dotted gray", sItemBackground: "transparent", sItemBackgroundHover: "#e0e0f0" }); } function tick2() { if (typeof(document.forms.quickModForm) != "undefined") { calcCharLeft2(); setTimeout("tick2()", 1000); } else setTimeout("tick2()", 800); } function message_onkeyup() { if (typeof(document.forms.quickModForm) != "undefined" && typeof(document.forms.quickModForm.message) != "undefined") { document.forms.quickModForm.message.onkeyup = function onkeyup(event) { storeCaret(this); calcCharLeft2(); }; } else setTimeout("message_onkeyup()", 800); } message_onkeyup(); function calcCharLeft2() { var maxLength = 20000; var oldEditor = "", currentEditor = document.forms.quickModForm.message.value; if (!document.getElementById("editorLeft2")) return; if (oldEditor != currentEditor) { oldEditor = currentEditor; if (currentEditor.replace(/\r/, "").length > maxLength) document.forms.quickModForm.message.value = currentEditor.replace(/\r/, "").substring(0, maxLength); currentEditor = document.forms.quickModForm.message.value.replace(/\r/, ""); } setInnerHTML(document.getElementById("editorLeft2"), maxLength - currentEditor.length); } // ]]>-->