The graphics and touch functions were modified, and borrowed, from the Henning Karlsen examples provided in his libraries.
I used some code I found at: to adjust the ADC sample time. The input is limited to a 5volt peak to peak waveform, unless you use a voltage divider at the input, and also limited to positive waveforms from 0 to 5 volts. The Oscilloscope bandwidth is limited to about 1 khz, but there is room for improvement.
The code is well documented, but, if you have trouble understanding it, leave a comment and I’ll try to explain it. I divided the program into several subrutines to make it easier to understand.
I’ve had to do a fair amount of research to come up with the code, and many snippets have been “borrowed” from several sources. Before we copy and paste the program, let’s review some limitations and explain the program. Step 5: The software: UTouch library test.īelow, you will find the sketch for the Oscilloscope. Pictures in this step, show screenshots of the demo running. If everything is Ok, you will see a cool demo program running. If there are no errors, click on upload to load and execute the program. Now, go to the tools menu, click on board, and select Arduino Mega 2560 or Mega ADK, if not already selected.Ĭlick on verify to compile the program. UTFT myGLCD(ITDB32S,38,39,40,41) // Remember to change the model parameter to suit your display module!Ĭomment out the command for the UNO, and uncomment the command for the Mega ,as I did. Uncomment the next line for Arduino Mega UTFT myGLCD(ITDB32S,19,18,17,16) // Remember to change the model parameter to suit your display module! Uncomment the next line for Arduino 2009/Uno With the program loaded in the IDE, scroll down to view the following code: If the UTFT option is in your menu list, select it, then select arduino, and finally, UTFT_Demo_320x240. If the libraries installed properly, you will see the UTFT and the UTouch options when you click on the Files option, and scroll down to examples.
If you haven’t done so, download the UTFT and UTouch Libraries, and copy them to the libraries folder where you have the arduino IDE installed.
If you finished putting your kit together, plug it into the USB cable that connects to your PC running the Arduino IDE. The oscilloscope, like my 4 channel DC DVM, will not be as accurate asĪ commercial unit, but it works pretty good for low voltage and low frequencies. Stabilize the waveform on the screen, or to wait for an event before
Level to a voltage value of your choosing. It is usually measured inĪ trigger signal can be generated when the signal value reaches some Is to voltage applied to the input terminals. That’s the measure of how sensitive the display dot Like milliseconds/centimeter or milliseconds per division.This might alsoīe referred to as the horizontal sensitivity. Sweep speed is usually measured in units of time per distance, These are functions you can control on most oscilloscopes: Oscilloscope behavior, using the touch capabilities of the screen display.īefore we start building and programming, lets review some basic In a 3.8″ TFT LCD touch display, and we will input data to modify the Varying signals by Writing a program that will also display those signals We will be using the Arduino analog A0 input to sample and capture time You will learn about the Arduino mega analog to digital converter( ADC).
We can use an oscilloscope to observe and study signal characteristics