Sda/scl pins and rx/to on leonardo as digital io

can i use the sda/scl pins and tx rx on the arduino leonardo as digital i/io ? want to connect toggle switches to it for a button box.

The pinout diagram states sda scl is D2,D3 and TX RX is D1 D0. will it be okay if i do so or should i expect magic smoke to come out ? that way i dont have to code for a button matrix and deal with all the wiring and stuff.

If you don't have another use for those pins, the answer is yes. SDA and SCL are used for the I2C bus and RX and TX are Serial1 (note the 1).

no absolutely no use other than digital io thanks :slight_smile:

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.