Menu Interface: Pin State Monitor

June 2, 2017


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


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
Share on twitter
Share on pinterest
Share on reddit
Share on print
Related Tutorials & Projects
Evive mini oscilloscope current sensing

Mini Oscilloscope

Introduction An oscilloscope is a type of electronic test instrument that allows observation of constantly…
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.

How to interface water pump with evive?

This tutorial discusses how we can interface water pump with evive . How we can control the speed of water flow using the evive menu? How we can control the speed using potentiometer with a simple scratch code.All the answers are given in this tutorial.LET'S BEGIN....
Featured Projects

Leave a Reply