Binary Arithmetic And Port Manipulation – Part Ii

Photo of talofer99

Made by talofer99

About the project

One port to read them all

Project info

Difficulty: Easy

Estimated time: 1 hour

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

Items used in this project

Hardware components

DFRobot I2C 16x2 Arduino LCD Display Module DFRobot I2C 16x2 Arduino LCD Display Module x 1
momentary push button momentary push button x 8
Arduino UNO Arduino UNO x 1

Software apps and online services

wokwi Arduino web simulator wokwi Arduino web simulator
Arduino IDE Arduino IDE

Story

In the first part I covered output of 8 LEDS using one port.

In this tutorial will use the port for input. Reading with one line of command the sate of 8 buttons.

Showing the difference in time it takes to perform this test.

Will also cover cool options of key combination, using the port input value.

I used WOKWI great web Arduino simulator the code from the video is available at https://wokwi.com/arduino/projects/284193979507933709

You can watch Part I here

For WOKWI great article on time counting in Arduino https://blog.wokwi.com/how-to-measure-the-speed-of-arduino-code/

For more read about binary arithmetic and its practical uses in Arduino

https://playground.arduino.cc/Code/BitMath

Some more info on ports in Arduino

https://www.arduino.cc/en/Reference/PortManipulation

Schematics, diagrams and documents

schmatics_bb_s7Ql4lY7uM.png

Code

Untitled file

Credits

Photo of talofer99

talofer99

Maker @ heart

   

Leave your feedback...