Teensy 2.0 ANALOG IN

Status
Not open for further replies.

dpmarkman

New member
I'm sorry if this question is answered somewhere else, I tried looking for the answer and could not find it.

I am trying to port over some code I wrote for the Arduino Diecimilia and in the code i use I2C and the 2wire.h library to communicate with a parallax OFN Module (part number 27903). To do that with the Diecimilia I connect two of the OFN pins (CLK and SDA) to ANALOG IN pin 4 and 5 of the Diecimilia. I don't see any pins on the Teensy marked "ANALOG IN". Which pins on the Teensy work as analog in, or, which pins should I use on the Teensy for I2C communication?

Thank you
 
I am trying to port over some code I wrote for the Arduino Diecimilia and in the code i use I2C and the 2wire.h library to communicate with a parallax OFN Module (part number 27903). To do that with the Diecimilia I connect two of the OFN pins (CLK and SDA) to ANALOG IN pin 4 and 5 of the Diecimilia. I don't see any pins on the Teensy marked "ANALOG IN". Which pins on the Teensy work as analog in, or, which pins should I use on the Teensy for I2C communication?

On the Diecimilia (and the Uno) the I2C functionality and the Analog to Digital functionality happen to share pins. Apart from that though they are unrelated (I2C communicates with digital pulses, not analog voltage levels). So you should be looking on the Teensy pinout for SDA (I2C serial data) and SCL (I2C serial clock). On Teensy 2.0 these are D1 (SDA) and D0 (SCL).

You might find this page about I2C to be helpful.

@virstualdave - yes, but dpmarkman is not looking for analog to digital conversion, in fact.
 
@virtualdave thanks for answering the first part of the question. This will be helpful for me on my next project.

@Nantonos, thanks for answering the other portion of my question. I will update this post when I've got my final project working. I am combining two projects from Make Magazine issue 32. I'm using the OFN module to act as a combination lock and a buttion/selector. I am using the Teensy's USB keyboard functionallity to help me remember and enter passwords for different websites and logins.
 
I'm using the OFN module to act as a combination lock and a buttion/selector. I am using the Teensy's USB keyboard functionallity to help me remember and enter passwords for different websites and logins.

That sounds like a useful project! Avoids the temptation for password re-use between sites.
 
Status
Not open for further replies.
Back
Top