I am making a project for my college in which I need to measure the rpm of the motor and show the real-time clock on the 128x64 GLCD simultaneously but when I run the project it only shows one thing at a time. is there any method to show both of them simultaneously I am not putting any code because I just compile my hall sensor separately and rtc code separately

closed as unclear what you're asking by per1234, KIIV, VE7JRO, MatsK, sempaiscuba Jul 10 '18 at 15:59

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • You write code that does what you want. You never "do two things simultaneously", but write code that just does what you want. You have to understand what your current "two codes" do and how they work before you can try getting them to work together. – Majenko Jul 10 '18 at 10:58
  • 2
    Without code it's hard to suggest improvements. Have a look at the blink without delay example (millis to get rid of blocking code like delay). This is what I used to emulate parallel processing. – idkfa Jul 10 '18 at 11:01
  • Interrupts are your friend. So are the timer/counters. – BobT Jul 10 '18 at 13:56

Arduino Microprocessors are mostly single core devices and thus are unable to do more than one thing at a time. The trick is to write code efficiently so it looks like several things are happening at the same time but in reality they just happen very quickly. The LCD only needs to show time every second and displaying RPM every second should be enough so to get both to happen within a second should be possible.

Not the answer you're looking for? Browse other questions tagged or ask your own question.