Graph Math On Your Scope
About the project
Make a gift for your geeky significant other that's neither fattening nor underwear.
Project info
Difficulty: Moderate
Estimated time: 2 hours
License: GNU General Public License, version 3 or later (GPL3+)
Items used in this project
Software apps and online services
Story
Just in time for next Valentine's Day I will show you how to make a gift for your geeky significant other that's neither fattening nor underwear.
A valentines themed microcontroller project.
Using an Arduino compatible Teensy 3.5 to graph a heart shaped math function on an Oscilloscope
Graph a heart shaped function on an oscilloscope using a Arduino compatible Teensy 3.5
Draw a heart on an O'scope on Valentines Day for your S.O.
The actual functions I used came from the bottom right hand heart displayed on the cup at the beginning of the video.
In particular:
- tempX=16*sin(r)*sin(r)*sin(r); tempY=13*cos(r)-(5*cos(2*r))-(2*cos(3*r)) -(cos(4*r));
Then I scale them and store them for "display" in the main loop.
tempX=tempX*scale+offset; // scale x X{arrayIndex}=(uint16_t) (tempX); // store x in 16 bits tempY=tempY*scale+offset; // scale y Y{arrayIndex}=(uint16_t) (tempY); // store y in 16 bits I do this in steps through 2*pi radians.
Full source code here:
https://drive.google.com/drive/folders/15-XriBaAEiLUbr68w7DKmoDRD-PYiZH_
Leave your feedback...