victor_pv:
Ray, I was looking at your oscilloscope example, really nice, and really simple code!
You should give it a try with the ILI9341_STM library in Roger's repo, that can do the Hlines and Vlines with DMA and speed up the screen refresh a lot.I may try it myself, but I'm thinking on what could I use to get a sine wave as I don't have any signal generator.
The STM in the Maple Mini does not have a DAC, right?Thanks for sharing it.
Thanks!
I actually did do that this morning and from a visual perspective, I saw about 25% improvement (based on a common freq from my function gen and the increased waveform displayed via the target display.) That is, I saw more waveform because the loop was running faster.
The code was a rainy-day play. The loop could be much faster without the map() function and I could probably combine the two writes to the screen: the one that writes a vertical line for 'erase' and the pixel placement based on input voltage (0 - 3.3). But, I just wanted to use base functions and see what I would get.
It may be useful at this point without enhancements for such things as:
- AC finder for locating wiring behind walls
- General 10Hz - 100Hz stuff like:
- Transistor tester
- Diode forward voltage tests
Also, I thought the idea was neat because the implementation is so simple (slow) but for use in teaching physics or basic electronics, the under $10 price tag is remarkable. The code crys to be enhanced, however!
Ray
My Projects
PS: An X, Y input for playing with Lissajous curves can be done by using 2 AD inputs. Something like the snippet:
for(uint16_t j = 0; j <= myWidth + 1; j++ )
{
// map( value, fromLow, fromHigh, toLow, toHigh)
signalX = map(analogRead(A0), 0, 1023, 1, myWidth - 1) ;
signalY = map(analogRead(A1), 0, 1023, 1, myHeight - 1) ;
<...>
}