Dies ist eine 5V-Gleichspannungsquelle zur Versorgung elektronischer Schaltungen. Sie hat zwei Anschlüsse, + und -, zum Verbinden der positiven und negativen Versorgungsleitungen.
| Pin | Signal | Beschreibung |
|---|---|---|
5V - |
power | 5V DC Negative wire |
5V + |
power | 5V DC Positive wire |
| Von | Nach | Kabel |
|---|---|---|
x1:+ |
board:5V |
red |
x1:- |
board:GND |
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 beginner example for a 5V DC power source
// This example shows how to wire a 5V source to power the Arduino Uno.
// Note: Do not connect two power supplies to the Uno at the same time unless you know what you are doing.
void setup() {
Serial.begin(9600);
while (!Serial) {
;
}
Serial.println("5V DC source connected to Arduino UNO 5V and GND.");
Serial.println("The board is powered externally through the 5V pin.");
}
void loop() {
// No runtime control is needed for a power source example.
}
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