Arduino Nano: Using Pull-Up Resistor With Visuino

by BoianM in Circuits > Arduino

14821 Views, 66 Favorites, 0 Comments

Arduino Nano: Using Pull-Up Resistor With Visuino

Arduino Nano: Using Pull-Up Resistor With Visuino

One of the most underused features of Arduino are the Pull-Up Resistors of the Digital pins. We all know that they are there, and yet we keep forgetting that we can use them, and keep adding external resistors when they are not needed. In this Instructable, I will show you how easy it is to use them in Visuino - an easy to use graphical development environment for Arduino.

The Pull-Up Resistors are most often used when working with digital switches, and one of the simplest, and easily available switch of them all is just 2 wires, so...

Components

577d66e84fbadea3ab000003.jpeg
  1. One Arduino compatible board (I use Arduino Nano, because I have one, but any other will be just fine)
  2. 2 Male-Female jumper wires

Connect the Wires to Arduino

577d674ddeafa4d8ef000001.jpeg
577d677867400cbc3200001b.jpeg
  1. Connect one wire(Black wire) to the Ground pin of the Arduino (Picture 1)
  2. Connect the other wire(White wire) to the Digital pin 2 of the Arduino (Picture 1)
  3. Picture 2 shows where are the Ground, and Digital 2 pins of the Arduino Nano

Start Visuino, and Select the Arduino Board Type

SelectBoard.png
SelectBoard.png

To start programming the Arduino, you will need to have the Arduino IDE installed from here: http://www.arduino.cc/ .

Please be aware that there are some critical bugs in Arduino IDE 1.6.6. Make sure that you install 1.6.7 or higher, otherwise this Instructable will not work!

The Visuino: https://www.visuino.com also needs to be installed.

  1. Start Visuino as shown in the first picture
  2. Click on the "Tools" button on the Arduino component (Picture 1) in Visuino
  3. When the dialog appears, select Arduino Nano as shown in Picture 2

In Visuino: Connect the Digital 2 to Digital 13 Pin and Enable the Pull-Up Resistor

Connect.png
SetProperty.png
  1. Connect the "Out" pin of the Digital[ 2 ] channel of the Arduino component to the "Digital" input pin of the Digital[ 13 ] channel of the Arduino component as shown on Picture 1
  2. In the Object Inspector expand the "Digital" property, then the Digital[ 2 ] sub property, and set the value of the IsPullUp sub property to True (Picture 2)

Generate, Compile, and Upload the Arduino Code

GenerateCtopped.png
Arduino IDE.png
  1. In Visuino, Press F9 or click on the button shown on Picture 1 to generate the Arduino code, and open the Arduino IDE
  2. In the Arduino IDE, click on the Upload button, to compile and upload the code (Picture 2)

And Play...

VisuinoDiagramCropped.png
577d679e4fbadeba67000018.jpeg
577d67b02e7fb69b61000019.jpeg

On Picture 1 you can see the complete Visuino diagram.

If you run the project, when the wires are not connected the Pin 13 LED will be ON(Picture 2), if you connect the wires, the LED will turn OFF (Picture 3)

Congratulations! You have learned how to use the Pull-Up Resistor functionality of the digital pins of your Arduino.

Also attached is the Visuino project, that I created for this Instructable. You can download and open it in Visuino: https://www.visuino.com