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:cd69ae993250, 2009-09-22 (annotated)
- Committer:
- chris
- Date:
- Tue Sep 22 12:09:58 2009 +0000
- Revision:
- 1:cd69ae993250
- Parent:
- 0:ebf712d4ccfc
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| chris | 1:cd69ae993250 | 1 | #include "DemoBoard.h" |
| chris | 0:ebf712d4ccfc | 2 | |
| chris | 0:ebf712d4ccfc | 3 | /* |
| chris | 0:ebf712d4ccfc | 4 | * This project uses the triple axis accelerometer and the RGB LED |
| chris | 0:ebf712d4ccfc | 5 | * The x,y,z axes are assigned to the r,g,b components respectively |
| chris | 0:ebf712d4ccfc | 6 | * The acceleration in a given axis will modulate it's associated colour |
| chris | 0:ebf712d4ccfc | 7 | */ |
| chris | 0:ebf712d4ccfc | 8 | |
| chris | 0:ebf712d4ccfc | 9 | int main() { |
| chris | 0:ebf712d4ccfc | 10 | |
| chris | 0:ebf712d4ccfc | 11 | while(1) { |
| chris | 0:ebf712d4ccfc | 12 | rgb.red(abs(acc.x())); |
| chris | 0:ebf712d4ccfc | 13 | rgb.green(abs(acc.y())); |
| chris | 0:ebf712d4ccfc | 14 | rgb.blue(abs(acc.z())); |
| chris | 0:ebf712d4ccfc | 15 | wait (0.01); |
| chris | 0:ebf712d4ccfc | 16 | } |
| chris | 0:ebf712d4ccfc | 17 | |
| chris | 0:ebf712d4ccfc | 18 | } |
| chris | 0:ebf712d4ccfc | 19 | |
| chris | 0:ebf712d4ccfc | 20 |