comparison projects/scope_analogue/render.cpp @ 285:5433c83ce04e Doxy prerelease

Doxygen content added to more project render.cpp files and amended in others.
author Robert Jack <robert.h.jack@gmail.com>
date Tue, 17 May 2016 18:46:55 +0100
parents 0ee6eebb567a
children
comparison
equal deleted inserted replaced
284:7bfb25a2e158 285:5433c83ce04e
1 // this example reads the analogue inputs 0 and 1 1 /*
2 // and generates a sine wave with an amplitude and 2 ____ _____ _ _
3 // frequency determined by their values 3 | __ )| ____| | / \
4 // it then plots these on the oscilloscope 4 | _ \| _| | | / _ \
5 | |_) | |___| |___ / ___ \
6 |____/|_____|_____/_/ \_\.io
7
8 */
9
10 /**
11 \example 3_scope_analog
12
13 Connecting potentiometers
14 -------------------------
15
16 This example reads from analogue inputs 0 and 1 via `analogReadFrame()` and
17 generates a sine wave with amplitude and frequency determined by their values.
18 It's best to connect a 10K potentiometer to each of these analog inputs. Far
19 left and far right pins of the pot go to 3.3V and GND, the middle should be
20 connected to the analog in pins.
21
22 The sine wave is then plotted on the oscilloscope. Click the Open Scope button to
23 view the results. As you turn the potentiometers you will see the amplitude and
24 frequency of the sine wave change.
25
26 This project also shows as example of `map()` which allows you to re-scale a number
27 from one range to another. Note that `map()` does not constrain your variable
28 within the upper and lower limits. If you want to do this use the `constrain()`
29 function.
30
31 */
32
33
34
35
5 36
6 #include <BeagleRT.h> 37 #include <BeagleRT.h>
7 #include <cmath> 38 #include <cmath>
8 #include <Scope.h> 39 #include <Scope.h>
9 40