Kann ein Arduino-Mikrocontroller seine eigenen Pins erkennen, die miteinander verbunden sind?

970
1312EN

Ich habe eine Matrix und möchte sie ohne Verwendung von IC direkt mit Arduino verbinden.

Ich möchte, dass jedes Mal, wenn ich zwei Pins im Arduino-Mikrocontroller verbinde, beispielsweise Pin1 und Pin2, der Mikrocontroller automatisch erkennt, dass Pin1 und Pin2 verbunden waren. Alle Pins waren Eingangspins. Kann ein Arduino das tun?

0

1 Antwort auf die Frage

1
Julian Knight

You can connect two pins on an Arduino. But it isn't clear what you trying to do or why.

Since both pins are input, you can detect any changes on the pins in software - the only way to detect that anything is connected to a pin of course is for an electrical signal to change on that pin. When it does, you will detect that in software and take actions accordingly.

You can also connect an output pin to an input pin. Not much use of course unless you have some other circuitry that does something interesting between the two pins.

UPDATE: The thing to remember is that these cheap microcontrollers have minimal protection from overvoltage and high current. But as long as you do not exceed the specifications of the chipset (which will be one of the Atmel chips, the Uno uses the ATmega328 for example), you will be fine. The Atmel chips are reasonably robust and will happily work between 1.8 and 5.5v (not sure what max. current the pins support though). So just make sure your circuits are within parameters.

Vielen Dank @Julian Knight für diesen Kommentar. Ich muss nur wissen, ob dies möglich ist, weil ich befürchte, dass der Mikrocontroller zerstört werden könnte 1312EN vor 9 Jahren 0
Ok @ Julianischer Ritter. Vielen Dank für dieses Update. Ich muss nur auf meine Schaltungen achten und sicherstellen, dass die Spezifikationen des Chipsets nicht überschritten werden. 1312EN vor 9 Jahren 0
Keine Sorge, die Arduino sind im Gegensatz zum Raspberry Pi ziemlich nachsichtig. Julian Knight vor 9 Jahren 0