Showing posts with label pullup. Show all posts
Showing posts with label pullup. Show all posts

Friday, May 27, 2016

Pull-up and Pull-down Resistor Tutorial

In this post we take a look at what are pull-up and pull-down resistors, their purpose, and where to use them.



Arduino code from video:
void setup() {
  // put your setup code here, to run once:
  pinMode(3,INPUT);
  pinMode(6,INPUT_PULLUP);
  pinMode(5,INPUT);
  pinMode(4,INPUT);
  pinMode(2,INPUT);
  Serial.begin(57600);

}

void loop() {
  // put your main code here, to run repeatedly:
  Serial.print("This is the pull-up input D6 ");
  Serial.println(digitalRead(6));
  Serial.print("D5 input has no pull-up ");
  Serial.println(digitalRead(5));
   Serial.print("D4 input has no pull-up ");
  Serial.println(digitalRead(4));
  Serial.print("D3 input has no pull-up ");
  Serial.println(digitalRead(3));
   Serial.print("D2 input has no pull-up ");
  Serial.println(digitalRead(2));
  Serial.println();
  delay(1500);
}

Sunday, March 27, 2016

How to Protect your Arduino Design (Electrically) Part 1

In this video we look at how to protect your Arduino against different forms of electrical damage and ensure your design is electrically rugged. We will be looking at parts such as current limiting resistors, zenor diodes, and schottky barrier diodes.