Hi.
Is it possible to set some pins to be constant high or low? Ill guess it would be tricky if I write in the void loop, so where should I write it? if it is possible
Hi.
Is it possible to set some pins to be constant high or low? Ill guess it would be tricky if I write in the void loop, so where should I write it? if it is possible
When you digitalWrite() a pin either high or low it remains in that state until you explicitly tell it otherwise.
So, I can write it in the loop? I am going to test a radio module for communication, and it needs power constant.
If so, thanks
You can do it in setup if you don't touch the pin in loop.
Remember to set it as an output, and that digital pins can only supply 40mA (absolute maximum). Make sure your radio module draws less than that (it's probably better to solder wires together and stick them into the 5v pin)
Yes, digital IO pins should never be used to provide power to external devices. They are only just capable of driving LEDs.
If you require more than the 800mA (500mA if on USB) that the Arduino can provide through the +5V header connection, you will need an external power supply for your module.
digital IO pins should never be used to provide power to external devices
I really dislike blanket "don't"s like that.
If the external device takes a sensible amount of current, there's no reason at all not to use I/O pins.
Examples might be 4xxMHz radio transceivers, simple rangers, or other low voltage/current sensors that don't need to be on all the time.
Examples might be 4xxMHz radio transceivers, simple rangers, or other low voltage/current sensors that don't need to be on all the time.
That is what p-fets are for.
Why buy devices that take up board space, when they're built into the controller?
Thanks for the replies. I do not know if it worked or not, since I did not get contact with the arduino trough the rf module. It might not be configured right, or does not get enough power.
But thanks for the replies.
If we knew the spec of your radio module (hint), we might be able to help better
I got this one: APC220 Radio Communication Module - DFRobot
Hi,
I fixed the problem with the module. Now I can communicate with the arduino wireless. It does not work to transfer programs wireless, but that is not a problem for me.
Thanks for the help