![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Sample program on how to use the OPT3001 sensor on the RAKWirelss iTracker module
main.cpp@0:33cb2fa095df, 2018-02-12 (annotated)
- Committer:
- knaresh89
- Date:
- Mon Feb 12 05:06:24 2018 +0000
- Revision:
- 0:33cb2fa095df
Sample program on how to use the OPT3001 sensor on the RAKWireless iTracker module
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
knaresh89 | 0:33cb2fa095df | 1 | #include "mbed.h" |
knaresh89 | 0:33cb2fa095df | 2 | |
knaresh89 | 0:33cb2fa095df | 3 | // main() runs in its own thread in the OS |
knaresh89 | 0:33cb2fa095df | 4 | int main() { |
knaresh89 | 0:33cb2fa095df | 5 | read_DeviceID(); |
knaresh89 | 0:33cb2fa095df | 6 | while (true) { |
knaresh89 | 0:33cb2fa095df | 7 | wait(0.5); |
knaresh89 | 0:33cb2fa095df | 8 | read_sensor(); |
knaresh89 | 0:33cb2fa095df | 9 | } |
knaresh89 | 0:33cb2fa095df | 10 | } |
knaresh89 | 0:33cb2fa095df | 11 |