Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
main.cpp@1:308cc5302475, 2016-03-13 (annotated)
- Committer:
- 12104404
- Date:
- Sun Mar 13 19:08:41 2016 +0000
- Revision:
- 1:308cc5302475
- Parent:
- 0:815555c72774
- Child:
- 2:dd10c541a3dc
working found bug in waiting for ADC
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| 12104404 | 0:815555c72774 | 1 | #include "mbed.h" |
| 12104404 | 0:815555c72774 | 2 | #include "TSL2591.h" |
| 12104404 | 0:815555c72774 | 3 | |
| 12104404 | 0:815555c72774 | 4 | I2C i2c1(PB_9, PB_8); |
| 12104404 | 0:815555c72774 | 5 | TSL2591 sensor(i2c1, TSL2591_ADDR); |
| 12104404 | 0:815555c72774 | 6 | |
| 12104404 | 0:815555c72774 | 7 | DigitalOut myled(LED1); |
| 12104404 | 0:815555c72774 | 8 | |
| 12104404 | 0:815555c72774 | 9 | int main() |
| 12104404 | 0:815555c72774 | 10 | { |
| 12104404 | 0:815555c72774 | 11 | sensor.init(); |
| 12104404 | 0:815555c72774 | 12 | while(1) { |
| 12104404 | 0:815555c72774 | 13 | sensor.getALS(); |
| 12104404 | 1:308cc5302475 | 14 | wait(0.1); |
| 12104404 | 0:815555c72774 | 15 | } |
| 12104404 | 0:815555c72774 | 16 | } |