The Micro USB to 2-Pin Cable Connector is a versatile and commonly used electronic component that serves as a bridge between a micro USB power source and devices with a 2-pin interface. This cable is particularly useful for powering a wide range of electronic devices, such as development boards, small electronics projects, and battery chargers.
Pin Number | Description | Notes |
---|---|---|
1 | VCC (Power) | Connected to Micro USB VBUS pin |
2 | GND (Ground) | Connected to Micro USB GND pin |
// This example demonstrates how to power an Arduino UNO using the Micro USB to 2-Pin Cable.
// No additional code is required for power connection.
void setup() {
// Initialize digital pin LED_BUILTIN as an output.
pinMode(LED_BUILTIN, OUTPUT);
}
void loop() {
// Turn the LED on (HIGH is the voltage level)
digitalWrite(LED_BUILTIN, HIGH);
// Wait for a second
delay(1000);
// Turn the LED off by making the voltage LOW
digitalWrite(LED_BUILTIN, LOW);
// Wait for a second
delay(1000);
}
// Note: The above code is for demonstration purposes only. The actual implementation
// may vary depending on the specific application and device requirements.
Note: The Arduino UNO can be powered through its 2-pin VIN and GND connections using the Micro USB to 2-Pin Cable, provided the power source is compatible with the Arduino's voltage and current requirements. Always refer to the Arduino UNO's specifications for proper power supply parameters.