Jump to content

So I'm creating a program that allows me to send information back and forth to a different micro controller but for the design I made to work I need to be able to use the pins as both input and outputs. My plan is to have one of them be input mode and one in output mode and check the information being passed through and then flip the other way around so the other can send its information. It would just do that a bunch of times flipping every so often. So my question is, is it possible to redefine pins as inputs or outputs in the loop somehow without any issues? I've been looking around for answers through Google but I can't seem to find anything relevant to my question. So if you have an answer or some source that might help me find one I would greatly appreciate it! Thank you for time in at least attempting to help me even if it ends up being that I can't do this at all.

"Her tsundere ratio is 8:2. So don't think you could see her dere side so easily."


Planing to make you debut here on the forums? Read Me First!


unofficial LTT Anime Club Heaven Society

Link to comment
https://linustechtips.com/topic/156618-arduino-question/
Share on other sites

Link to post
Share on other sites

It has been a while since I've done sth with Arduino's, but IIRC it should be possible to change I/O at runtime. Don't know the commands for it, though.

 

PS: moved to Software Design section

Link to comment
https://linustechtips.com/topic/156618-arduino-question/#findComment-2087688
Share on other sites

Link to post
Share on other sites

According to this thread, it should work.

 

http://forum.arduino.cc/index.php?topic=49318.0

Sweet, I'll have to see if that works here in a little bit. Thank you for finding that!

"Her tsundere ratio is 8:2. So don't think you could see her dere side so easily."


Planing to make you debut here on the forums? Read Me First!


unofficial LTT Anime Club Heaven Society

Link to comment
https://linustechtips.com/topic/156618-arduino-question/#findComment-2087725
Share on other sites

Link to post
Share on other sites

Software Serial is possibly what you are looking for. Depending on the Arduino it can be done with the Arduino software natively, or it can be done with a library. The Arduino Mega has more than one serial interface, where the Uno only has one (pin 0 and 1)

It worked out for what I needed it for and I needed the one so I could have alot more pins for options. This way I get 63 different options.

"Her tsundere ratio is 8:2. So don't think you could see her dere side so easily."


Planing to make you debut here on the forums? Read Me First!


unofficial LTT Anime Club Heaven Society

Link to comment
https://linustechtips.com/topic/156618-arduino-question/#findComment-2090734
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×