Mercurial > hg > beaglert
diff examples/02-Digital/digital-output/render.cpp @ 543:8f8809c77dda prerelease
updated basics, digital, instruments, extras examples
author | chnrx <chris.heinrichs@gmail.com> |
---|---|
date | Fri, 24 Jun 2016 13:19:52 +0100 |
parents | 1cec96845a23 |
children |
line wrap: on
line diff
--- a/examples/02-Digital/digital-output/render.cpp Fri Jun 24 13:00:31 2016 +0100 +++ b/examples/02-Digital/digital-output/render.cpp Fri Jun 24 13:19:52 2016 +0100 @@ -80,6 +80,8 @@ either `HIGH` or `LOW`. When set `HIGH` the pin will give 3.3V, when set to `LOW` 0V. +Note that there are two ways of specifying the digital pin: using the GPIO label (e.g. `P8_07`), or using the digital IO index (e.g. 0) + To keep track of elapsed time we have a sample counter count. When the count reaches a certain limit it switches state to either `HIGH` or `LOW` depending on its current value. In this case the limit is `context->digitalSampleRate*interval` which