CampbellGroup / common

Shared campbell lab code.
GNU Lesser General Public License v3.0
8 stars 5 forks source link

in arduinoTTL server function ttl_read(chan) changes output #193

Closed annaliw closed 7 years ago

annaliw commented 7 years ago

When I use the function ttl_read(chan) it rewrites the TTL output to False instead of just returning the TTL state. Has anyone else seen this?

jchristensen133 commented 7 years ago

Ya it doesn't work right. On a long list of things to fix. If you could figure it out and submit a fixed pull request that would be awesome!!

On Aug 5, 2017, at 12:29 PM, annaliw notifications@github.com wrote:

When I use the function ttl_read(chan) it rewrites the TTL output to False instead of just returning the TTL state. Has anyone else seen this?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

aransfor commented 7 years ago

It supposed to do that, you cant read an out put your writing to. When you change an Arduino to "readmode" on a pin it can no longer define an output and goes into high impedence mode. The read is designed to read external TTLs not tell you what TTL you output

annaliw commented 7 years ago

Okay, thanks for explaining that. The function's other name (TTLInput) makes more sense to me now.