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

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