Robojax

Lesson 07: Getting Additional 5V and GND from Arduino

In this video we learn how to add additional 5V or GND pins or 3.3V and GND pins depending the voltage of the board.


 /*
 * S01-07 Additioinal 5V or GND pin.
 If your Arduino board voltage is 3.3V, then we will get 3.3V and GRND pin
 
 * Arduino Sketch to give you extra 5V pin from Arduino
  Please watch video instruction here https://youtu.be/pQKrl5Kpi50
 This code is available at http://robojax.com/course1/?vid=lecture07
 
with over 100 lectures Free On  YouTube Watch it here http://robojax.com/L/?id=338
Get the code for the course: http://robojax.com/L/?id=339 
 * Written by Ahmad Shamshiri for Robojax, robojax.com http:youTube.com/robojaxTV
 * on Jan 01, 2019 at 08:54 in Ajax, Ontario, Canada
 * 
 */
#define VCC2  5 // define pin 5 or any other digial pin here as VCC2
#define GND2  2 // define pin 2 or any other digital pin as Ground 2

void setup() {
    
  pinMode(VCC2,OUTPUT);//define a digital pin as output
  digitalWrite(VCC2, HIGH);// set the above pin as HIGH so it acts as 5V

  pinMode(GND2,OUTPUT);//define a digital pin as output
  digitalWrite(GND2, LOW);// set the above pin as LOW so it acts as Ground  

}

void loop() {
	//Robojax Step By Step Arduino Course http://robojax.com/L/?id=338


}