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.
Dependencies: C12832 MMA7660 RPCInterface mbed
Fork of RPC_Serial by
main.cpp@2:5a18ea4b4077, 2015-05-19 (annotated)
- Committer:
- R0375604
- Date:
- Tue May 19 16:51:52 2015 +0000
- Revision:
- 2:5a18ea4b4077
- Parent:
- 1:e245b0b4d96c
Test
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| JonathanCaes | 1:e245b0b4d96c | 1 | |
| harrisjunaid | 0:3ffd66df9efb | 2 | #include "mbed.h" |
| JonathanCaes | 1:e245b0b4d96c | 3 | //include PRPC command file |
| JonathanCaes | 1:e245b0b4d96c | 4 | #include "SerialRPCInterface.h" |
| R0375604 | 2:5a18ea4b4077 | 5 | SerialRPCInterface SerieleInterface(USBTX, USBRX); |
| JonathanCaes | 1:e245b0b4d96c | 6 | |
| R0375604 | 2:5a18ea4b4077 | 7 | |
| R0375604 | 2:5a18ea4b4077 | 8 | float PWM = 0; |
| JonathanCaes | 1:e245b0b4d96c | 9 | |
| R0375604 | 2:5a18ea4b4077 | 10 | RPCVariable<float> RPCPWM(&PWM,"PWM"); |
| JonathanCaes | 1:e245b0b4d96c | 11 | |
| R0375604 | 2:5a18ea4b4077 | 12 | AnalogIn Pot(p20); |
| R0375604 | 2:5a18ea4b4077 | 13 | DigitalOut myled1(LED1); |
| JonathanCaes | 1:e245b0b4d96c | 14 | |
| R0375604 | 2:5a18ea4b4077 | 15 | |
| R0375604 | 2:5a18ea4b4077 | 16 | int main() |
| R0375604 | 2:5a18ea4b4077 | 17 | { |
| R0375604 | 2:5a18ea4b4077 | 18 | while(1) |
| R0375604 | 2:5a18ea4b4077 | 19 | { |
| R0375604 | 2:5a18ea4b4077 | 20 | PWM = Pot; |
| R0375604 | 2:5a18ea4b4077 | 21 | myled1 = 1; |
| harrisjunaid | 0:3ffd66df9efb | 22 | } |
| R0375604 | 2:5a18ea4b4077 | 23 | } |
