Arduino Nano: Using Pull-up Resistor With Visuino

Photo of Ron

Made by Ron / Robotics / Sensors

About the project

Learn how to use the Arduino Pull-Up resistors in your projects.

Project info

Difficulty: Easy

Platforms: ArduinoVisuino

Estimated time: 1 hour

License: GNU General Public License, version 3 or later (GPL3+)

Items used in this project

Hardware components

Arduino Nano R3 Arduino Nano R3 x 1

Software apps and online services

Arduino IDE Arduino IDE
Visuino - Graphical Development Environment for Arduino Visuino - Graphical Development Environment for Arduino

Story

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 Tutorial, 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...

Step 1: Components

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

Step 2: Connect the wires to Arduino

1 / 2Picture 1

Picture 1

Picture 1

Picture 2

Picture 2

  • Connect one wire(Black wire) to the Ground pin of the Arduino (Picture 1)
  • Connect the other wire(White wire) to the Digital pin 2 of the Arduino (Picture 1)
  • Picture 2 shows where are the Ground, and Digital 2 pins of the Arduino Nano

Step 3: Start Visuino, and select the Arduino Board type

1 / 2Picture 1

Picture 1

Picture 1

Picture 2

Picture 2

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 Tutorial will not work!

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

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

Step 4: In Visuino: Connect the Digital 2 to Digital 13 pin and enable the Pull-Up resistor

1 / 2Picture 1

Picture 1

Picture 1

Picture 2

Picture 2

  • 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
  • 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)

Step 5: Generate, Compile, and Upload the Arduino code

1 / 2Picture 1

Picture 1

Picture 1

Picture 2

Picture 2

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

Step 6: And play...

1 / 3Picture 1

Picture 1

Picture 1

Picture 2

Picture 2

Picture 3

Picture 3

On Picture 1 you can see the complete Visuino diagram.

If you run the project, when the wires are not connected the Pin 13LED 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 Tutorial. You can download and open it in Visuino: https://www.visuino.com

Credits

Photo of Ron

Ron

Arduino Developer

   

Leave your feedback...