Honmaka Astro MicroControler sample Heater Contoler Sample Ver 1
Fork of PulseMotor3 by
main.cpp@3:4b8ecd83d8f1, 2015-01-22 (annotated)
- Committer:
- Honmaka
- Date:
- Thu Jan 22 08:44:29 2015 +0000
- Revision:
- 3:4b8ecd83d8f1
- Parent:
- 2:61ec30f77bc3
Heater Contoler Sample
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Honmaka | 0:27fe3b05f1fc | 1 | #include "mbed.h" |
Honmaka | 0:27fe3b05f1fc | 2 | |
Honmaka | 3:4b8ecd83d8f1 | 3 | PwmOut Heater(p21); |
Honmaka | 3:4b8ecd83d8f1 | 4 | AnalogIn Level(p15); |
Honmaka | 2:61ec30f77bc3 | 5 | |
Honmaka | 0:27fe3b05f1fc | 6 | int main() { |
Honmaka | 0:27fe3b05f1fc | 7 | while(1) { |
Honmaka | 3:4b8ecd83d8f1 | 8 | Heater.period_us(10000); |
Honmaka | 3:4b8ecd83d8f1 | 9 | Heater.pulsewidth_us(10000*Level); |
Honmaka | 3:4b8ecd83d8f1 | 10 | wait(0.1); |
Honmaka | 0:27fe3b05f1fc | 11 | } |
Honmaka | 0:27fe3b05f1fc | 12 | } |
Honmaka | 2:61ec30f77bc3 | 13 | |
Honmaka | 2:61ec30f77bc3 | 14 |