Een 12V-gelijkspanningsbron of voedingsaansluiting voor het voeden van compatibele circuits met gelijkstroom. Het gebruikt twee aansluitingen, + en -, en moet met de juiste polariteit worden aangesloten. Het wordt meestal gebruikt als externe voedingsingang en niet als signaalcomponent.
| Pin | Signaal | Beschrijving |
|---|---|---|
12V - |
power | 12V DC negative wire |
12V + |
power | 12V DC positive wire |
| Van | Naar | Draad |
|---|---|---|
board:GND |
x1:- |
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 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.
}
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