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@0:72aef1a2a084, 2017-01-30 (annotated)
- Committer:
- rvasquez6089
- Date:
- Mon Jan 30 17:31:18 2017 +0000
- Revision:
- 0:72aef1a2a084
Not working at the moment
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| rvasquez6089 | 0:72aef1a2a084 | 1 | #include "mbed.h" |
| rvasquez6089 | 0:72aef1a2a084 | 2 | #include "PCA9555.h" |
| rvasquez6089 | 0:72aef1a2a084 | 3 | //------------------------------------ |
| rvasquez6089 | 0:72aef1a2a084 | 4 | // Hyperterminal configuration |
| rvasquez6089 | 0:72aef1a2a084 | 5 | // 9600 bauds, 8-bit data, no parity |
| rvasquez6089 | 0:72aef1a2a084 | 6 | //------------------------------------ |
| rvasquez6089 | 0:72aef1a2a084 | 7 | |
| rvasquez6089 | 0:72aef1a2a084 | 8 | Serial pc(PA_11, PA_12); |
| rvasquez6089 | 0:72aef1a2a084 | 9 | |
| rvasquez6089 | 0:72aef1a2a084 | 10 | DigitalOut myled(LED1); |
| rvasquez6089 | 0:72aef1a2a084 | 11 | PCA9555 i2cex(PB_9,PB_8,PA_15,40); |
| rvasquez6089 | 0:72aef1a2a084 | 12 | DigitalOut EN33(PA_8); |
| rvasquez6089 | 0:72aef1a2a084 | 13 | int main() { |
| rvasquez6089 | 0:72aef1a2a084 | 14 | int i = 1; |
| rvasquez6089 | 0:72aef1a2a084 | 15 | pc.printf("Hello World !\n"); |
| rvasquez6089 | 0:72aef1a2a084 | 16 | i2cex.setPin(2); |
| rvasquez6089 | 0:72aef1a2a084 | 17 | while(1) { |
| rvasquez6089 | 0:72aef1a2a084 | 18 | wait(1); |
| rvasquez6089 | 0:72aef1a2a084 | 19 | |
| rvasquez6089 | 0:72aef1a2a084 | 20 | pc.printf("This program runs since %d seconds.\n", i++); |
| rvasquez6089 | 0:72aef1a2a084 | 21 | //EN33 = !EN33; |
| rvasquez6089 | 0:72aef1a2a084 | 22 | } |
| rvasquez6089 | 0:72aef1a2a084 | 23 | } |
| rvasquez6089 | 0:72aef1a2a084 | 24 |