Mercurial > hg > beaglert
comparison projects/scope_basic/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 /* | |
2 ____ _____ _ _ | |
3 | __ )| ____| | / \ | |
4 | _ \| _| | | / _ \ | |
5 | |_) | |___| |___ / ___ \ | |
6 |____/|_____|_____/_/ \_\.io | |
7 | |
8 */ | |
9 | |
10 /** | |
11 \example 1_scope_basic | |
12 | |
13 Oscilloscope in-browser | |
14 ----------------------- | |
15 | |
16 This example demonstrates the scope feature of the IDE. | |
17 | |
18 The scope is instantiated at the top of the file via `Scope scope;` | |
19 | |
20 In `setup()` we define how many channels the scope should have and the sample | |
21 rate that it should run at via `scope.setup(3, context->audioSampleRate)`. | |
22 | |
23 In `render()` we choose what the scope log via `scope.log(out, out2, out3)`. | |
24 In this example the scope is logging three sine waves with different phases. To see | |
25 the output click on the <b>Open Scope</b> button. | |
26 | |
27 An additional option is to set the trigger of the oscilloscope from within `render()`. | |
28 In this example we are triggering the scope when oscillator 1 becomes less than | |
29 oscillator 2 via `scope.trigger()`. Note that this functionality only takes effect | |
30 when the triggering mode is set to custom in the scope UI. | |
31 | |
32 */ | |
33 | |
34 | |
1 #include <BeagleRT.h> | 35 #include <BeagleRT.h> |
2 #include <Scope.h> | 36 #include <Scope.h> |
3 #include <cmath> | 37 #include <cmath> |
4 | 38 |
5 // set the frequency of the oscillators | 39 // set the frequency of the oscillators |