Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 6 of 6

Thread: Generating and displaying a line graph - Teensy 3.2

  1. #1
    Junior Member
    Join Date
    Sep 2022
    Posts
    4

    Generating and displaying a line graph - Teensy 3.2

    Context:
    Iím creating an audio network analyser based around a Teensy 3.2. It generates a range of frequencies (20Hz - 20kHz) which are fed into a Device Under Test (DUT), then measures the output to see how the DUT is attenuating or boosting particular frequencies. It does this several times, actuating a knob on the DUT between each set of measurements. This functionality is working well, but just dumping data via Serial.print().

    Goal:
    For ease of use, I want a signal response graph (example below) to be generated once all measurements have been made. It needs to have a logarithmic x-axis, and be able to display several curves. Iíve done some googling but donít really know what Iím looking for. Itís fine if the Teensy stays connected to a laptop, or displaying on a standalone screen would be great too, if it doesnít add too much software complexity.
    Click image for larger version. 

Name:	Screen Shot 2022-09-12 at 10.54.16 am.jpg 
Views:	3 
Size:	64.6 KB 
ID:	29347

    Questions:
    What options would people recommend for generating and displaying a line graph with Teensy 3.2? Iíve heard Processing recommended for use with Arduino, would this be a good method? Or, would it be hard to generate everything on the Teensy and display it on small LCD / OLED? How would this be achieved? Any suggestions would be really appreciated, I'm a bit lost.

  2. #2
    Like this?

    https://studio.youtube.com/video/vyvtpjQgRKQ/edit

    However its cartesian only.

  3. #3
    Junior Member
    Join Date
    Sep 2022
    Posts
    4
    Quote Originally Posted by KrisKasprzak View Post
    Like this?

    https://studio.youtube.com/video/vyvtpjQgRKQ/edit

    However its cartesian only.
    Thanks for your reply. I've seen your video and it looks good, but in my case it needs to be a logarithmic graph unfortunately. Is your library capable of creating a static graph from a set of data or is it only real-time/continuous like in the video?

  4. #4
    It does not plot real-time, i plots when you send data, so you can plot static data from a file for example. However it's not log, so I guess the lib can't help.

  5. #5
    Junior Member
    Join Date
    Sep 2022
    Posts
    4
    Quote Originally Posted by KrisKasprzak View Post
    It does not plot real-time, i plots when you send data, so you can plot static data from a file for example. However it's not log, so I guess the lib can't help.
    Maybe I'll try scaling my data in a way that creates a logarithmic curve when plotted on cartesian axes. I'm still struggling to find any other options, so that might be my best bet.

  6. #6
    It is possible, but you must have a TFT handy that allows you to present the graph in real time, but your array must also be capable of processing the amount of data you want to show, perhaps a teensy 4 would allow you to cover that aspect.

    MCU: Teensy 4.1
    TFT: Riverdi BT817 5" (EVE 4)
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	TFT_log10.png 
Views:	6 
Size:	713.9 KB 
ID:	29418  

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •