Codey OnlineArduino- & ESP32-componentenbibliotheek › 5V DC
5V DC
Input & knoppen

5V DC

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.

Breedte: 56.4 mm

Pinout — 5V DC

Pin Signaal Beschrijving
5V - power 5V DC Negative wire
5V + power 5V DC Positive wire

Voorbeeld-aansluitschema — 5V DC

Van Naar Draad
x1:+ board:5V red
x1:- board:GND black

Voorbeeld-Arduinocode — 5V DC

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.
}

Vergelijkbare componenten

12V DC power supply

12V DC power supply

Drukknop

Drukknop

HX711 Load Cell Amplifier

HX711 Load Cell Amplifier

Joystick module

Joystick module

Bouw je Arduino- of ESP32-project met AI

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