comparison projects/basic_blink/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 ac8eb07afcf5
children
comparison
equal deleted inserted replaced
284:7bfb25a2e158 285:5433c83ce04e
17 \example 2_digital_blink 17 \example 2_digital_blink
18 18
19 Blinking an LED 19 Blinking an LED
20 --------------- 20 ---------------
21 21
22 This sketch shows the simplest case of digital out. Connect an LED in series with 22 This sketch shows the simplest case of digital out.
23 a 470ohm resistor between P8_07 and ground. The led is blinked on and off by
24 setting the digital pin `HIGH` and `LOW` every interval seconds (set it in the
25 `render()` function).
26 23
27 Firstly the pin mode must be set to output mode: 24 - Connect an LED in series with a 470ohm resistor between P8_07 and ground.
28 `pinModeFrame(context, 0, P8_07, OUTPUT);` in the `setup()` function. The output 25
29 of the digital pins is set by the following code: 26 The led is blinked on and off by setting the digital pin `HIGH` and `LOW` every interval seconds which is set in
30 `digitalWriteFrame(context, n, P8_07, status);` where status can be equal to 27 `render()`.
28
29 In `setup()` the pin mode must be set to output mode via `pinModeFrame()`. For example:
30 `pinModeFrame(context, 0, P8_07, OUTPUT)`.
31 In `render()` the output of the digital pins is set by `digitalWriteFrame()`. For example:
32 `digitalWriteFrame(context, n, P8_07, status)` where `status` can be equal to
31 either `HIGH` or `LOW`. When set `HIGH` the pin will give 3.3V, when set to 33 either `HIGH` or `LOW`. When set `HIGH` the pin will give 3.3V, when set to
32 `LOW` 0V. 34 `LOW` 0V.
33 35
34 To keep track of elapsed time we have a sample counter count. When count reaches 36 To keep track of elapsed time we have a sample counter count. When count reaches
35 a certain limit it switches state to either `HIGH` or `LOW` depending on its current 37 a certain limit it switches state to either `HIGH` or `LOW` depending on its current