Menu Interface: Pin State Monitor

June 2, 2017

Introduction

Pin State monitor is included in the evive menu. It shows the state of all the digital and analog pins on evive. It shows output as high or low for digital pins and analog value for analog pins. The pins are displayed in tabular form on the evive screen.

There are 40 digital pins in evive and 16 analog pins. Different colors are used to show the pin no. and its’ respective output.

evive Pin state monitor sensor

Pin State Monitor Digital Analog

Pin State Monitor Digital Panel

Working

There is a function named digitalRead in library screen implementation.h in evive. It reads the state of digital pins in evive. In digital pins, there are 15 PWM pins whose state is determined first by a function called turnOffPWM in digitalRead which turns off PWM before reading pin. After this, it reads the pin and returns high if pin output is high and low if pin output is low. turnOffPWM uses standard(AVR) methods for setting, or clearing, bits in PORT.

Then the lcd_digital_pin_state_monitor_late() function prints all this on the screen. It uses for loop to set lcdCursor and print all the pins. Similarly, analog pins are also printed. The digitalRead returns high when the if condition *portInputRegister(port) & bit is true. portInputRegister returns an input port register of the specified port. bit = digitalPinToBitMask(pin) which returns the bit mask of a specified pin.

Example (Debugging and Checking Digital Sensors)

Pin State Montor Digital

Pin State Monitor Digital Panel 3

Suppose, you have an IR sensor to detect a ball passing through a tube.  Most of the sensors have an adjustment screws/potentiometer or you need to adjust the distance where the sensor is mounted from the ball. You can connect the sensor output to any Pin on evive and see the status of IR sensor on Pin State Monitor.

Example (Debugging and Calibrating Analog Sensors)

Pin State Monitor AnalogPin State Monitor Analog Panel

Suppose, we want to find a cutoff or maximum and minimum reading of an analog sensor like a Joystick or Flex sensor. We can move the thumbstick and take the readings from the Analog State Monitor. No need to make such a program, evive is there for you! 😉

Share this Documentation
Share on facebook
Facebook
Share on twitter
Twitter
Share on google
Google+
Share on pinterest
Pinterest
Share on reddit
Reddit
Share on print
Print
Related Tutorials & Projects
evive Menu Interface

Menu Interface

Introduction The conventional way of using Arduino is by making a program in Arduino IDE…
Smartphone Controlled Plant Watering 600px

Wirelessly Controlled Drip Irrigation System

In this project, you will control the drip irrigation system wirelessly using your smartphone. By using Bluetooth module and evive you will control the water-pump and thus be watering the plants.

Drip Irrigation System

Drip Irrigation System

In this project you will learn how to develop a mini drip irrigation system for your garden. It will help you water plants, shrubs, and trees in your garden with precision and ease.

All articles loaded
No more articles to load
Featured Projects
All articles loaded
No more articles to load

Leave a Reply

Close Menu
×

Cart