Arduino multi tasking

Brad's picture

Offline

Joined: Jun 03, 2019

Replies: 0
Arduino multi tasking
June 3, 2019 - 10:42pm

Could the mult-tasker on your website program be used as a base to get a dc voltage reading, than a ac voltage reading, than a hertz reading and display those readings on a LCD or LED display? If so how would that be accomplished?

Hiro_Hamada's picture

Offline

Joined: Apr 17, 2018

Replies: 108
Reading voltage and frequency using multi-taking
June 4, 2019 - 3:30pm

I assume that the tutorial that you are refering here is 

https://circuitdigest.com/microcontroller-projects/arduino-multitasking-using-millis-in-arduino

Arduino has built in ADC and pulse In function to measure analog voltage and frequency. The value of DC voltage to these ADC pins should be 0-5V and to measure AC voltage you have to use a diode or relevent circuit as Arduino cannot measure AC voltage directly. 

Now for your application I do not see a need for multitasking, however it is possible to use the timers and to avoid delay and speed up the process.