I'm working on a project to build an oscilloscope using the Arduino Mega2560. I've built the system using an 128x160 display, and I'm having difficulty showing a range of frequencies on the display.
The system I have developed measures the input signal with a 1ms delay between each measurement, doing this 120 times placing each reading in an array. I found I have to use a 1ms delay else it captures low frequencies too fast and will only show parts of waveform. Using this system, the scope only measures up to about 400Hz before Nyquist sets in and the waveform becomes distorted.
I measure frequency (top left) by checking the array and finding how many times the signal crossed 0. To stop the signal flying around the screen, i find the first value when it crossed 0 and draw the signal from there. Only 74 values from the 120 array are displayed.
Is there an mathematical way from the information given such that if frequency is above 'x' change delay, such that the system could auto range and measure upto 100kHz and display the signal on screen, is this possible?