In a previous lesson, you learned how to read (and scale)
a voltage, from a potentiometer. In this lesson we'll read and scale two potentiometers
to make an electronic etch-a-sketch.
Now you try. Scale the voltages from each potentiometer so you can draw in the entire plot area! Then draw
Type your code here:
See your results here:
Wire up this circuit, using two potentiometers. Run the above code, and turn
the potentiometers along their full range of motion. You should be able to "draw"
with the potentiometers in a small square near the center of the screen.
Reformulate the x = v1 and y = v2 lines to scale v1 and v2 to fill the whole screen.
For each, use a linear expression of the form $y=mx+b$, or y=m*v1+b and y=m*v2+b.
Instead of plotting points, you can also try plotting small circles via circle(x,y,2).
Show a friend, family member, or teacher what you've done!
Here is a share link to your code:
Does your code work? Want to run it on your iPhone?
Here's your code:
Use [Control]-[C] (Windows) or [⌘]-[C] (MacOS) to copy your code.
Paste it using [Control]-[V] (Windows) or [⌘]-[V] (MacOS) into
Then click the "Use on iPhone" button that you'll see.