Eine 12V-Gleichspannungsquelle oder ein Versorgungsanschluss zur Stromversorgung kompatibler Schaltungen mit Gleichstrom. Es verwendet zwei Anschlüsse, + und -, und muss mit der richtigen Polarität angeschlossen werden. Es wird meist als externer Stromeingang und nicht als Signalkomponente verwendet.
| Pin | Signal | Beschreibung |
|---|---|---|
12V - |
power | 12V DC negative wire |
12V + |
power | 12V DC positive wire |
| Von | Nach | Kabel |
|---|---|---|
board:GND |
x1:- |
black |
Dieses Beispiel wurde für das arduino-uno geschrieben und kompiliergeprüft. Codey Online passt es für jedes andere unterstützte Board an.
// Canonical example for a 12V DC source component
// Note: This is a passive power source. It is not controlled by the Arduino,
// so the example focuses on the safety connection of the negative terminal to GND.
void setup() {
Serial.begin(9600);
while (!Serial) {
;
}
Serial.println("12V DC source example");
Serial.println("Connect the negative terminal of the 12V supply to Arduino GND.");
Serial.println("The positive terminal is intentionally left unconnected in this canonical example.");
}
void loop() {
// No runtime action: this component is a DC power source.
}
Beschreib einfach, was du bauen willst. Codey Online schreibt den Code, zeichnet den Schaltplan, kompiliert alles und flasht dein Board direkt aus dem Browser.
Kostenlos starten