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@2:a167c8f6f859, 2014-07-25 (annotated)
- Committer:
- screamer
- Date:
- Fri Jul 25 12:31:16 2014 +0000
- Revision:
- 2:a167c8f6f859
- Parent:
- 0:9219bf515563
Add Apache2 license compatible header
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| screamer | 2:a167c8f6f859 | 1 | /* Copyright (c) 2010-2011 mbed.org, MIT License |
| screamer | 2:a167c8f6f859 | 2 | * |
| screamer | 2:a167c8f6f859 | 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software |
| screamer | 2:a167c8f6f859 | 4 | * and associated documentation files (the "Software"), to deal in the Software without |
| screamer | 2:a167c8f6f859 | 5 | * restriction, including without limitation the rights to use, copy, modify, merge, publish, |
| screamer | 2:a167c8f6f859 | 6 | * distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the |
| screamer | 2:a167c8f6f859 | 7 | * Software is furnished to do so, subject to the following conditions: |
| screamer | 2:a167c8f6f859 | 8 | * |
| screamer | 2:a167c8f6f859 | 9 | * The above copyright notice and this permission notice shall be included in all copies or |
| screamer | 2:a167c8f6f859 | 10 | * substantial portions of the Software. |
| screamer | 2:a167c8f6f859 | 11 | * |
| screamer | 2:a167c8f6f859 | 12 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING |
| screamer | 2:a167c8f6f859 | 13 | * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
| screamer | 2:a167c8f6f859 | 14 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, |
| screamer | 2:a167c8f6f859 | 15 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| screamer | 2:a167c8f6f859 | 16 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
| screamer | 2:a167c8f6f859 | 17 | */ |
| screamer | 2:a167c8f6f859 | 18 | |
| screamer | 0:9219bf515563 | 19 | #include "mbed.h" |
| screamer | 0:9219bf515563 | 20 | #include "TMP102.h" |
| screamer | 0:9219bf515563 | 21 | |
| screamer | 0:9219bf515563 | 22 | TMP102 temperature(D14, D15, 0x90); |
| screamer | 0:9219bf515563 | 23 | Serial pc(USBTX, USBRX); |
| screamer | 0:9219bf515563 | 24 | |
| screamer | 0:9219bf515563 | 25 | int main() |
| screamer | 0:9219bf515563 | 26 | { |
| screamer | 0:9219bf515563 | 27 | pc.printf("mbed application board!\r\n"); |
| screamer | 0:9219bf515563 | 28 | wait(3); |
| screamer | 0:9219bf515563 | 29 | |
| screamer | 0:9219bf515563 | 30 | int i=1; |
| screamer | 0:9219bf515563 | 31 | while(i++) { |
| screamer | 0:9219bf515563 | 32 | pc.printf("temp: %f\r", temperature.read()); |
| screamer | 0:9219bf515563 | 33 | wait(0.2); |
| screamer | 0:9219bf515563 | 34 | } |
| screamer | 0:9219bf515563 | 35 | } |