Dit is een 5V-gelijkspanningsbron om elektronische schakelingen van stroom te voorzien. Hij heeft twee aansluitingen, + en -, voor het aansluiten van de positieve en negatieve voedingslijnen.
| Pin | Signaal | Beschrijving |
|---|---|---|
5V - |
power | 5V DC Negative wire |
5V + |
power | 5V DC Positive wire |
| Van | Naar | Draad |
|---|---|---|
x1:+ |
board:5V |
red |
x1:- |
board:GND |
black |
Dit voorbeeld is geschreven en compile-gecheckt voor de arduino-uno. Codey Online past het voor je aan naar elk ander ondersteund board.
// 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.
}
Beschrijf wat je wilt bouwen. Codey Online schrijft de code, tekent het aansluitschema, compileert het en flasht je board rechtstreeks vanuit de browser.
Gratis starten