testing N-PRO-50 STM32F103R with N-PRO-3DP 3d printer controller
Dependencies: mbed
main.cpp@0:40bf929b78e3, 2020-03-13 (annotated)
- Committer:
- chalikias
- Date:
- Fri Mar 13 16:10:22 2020 +0000
- Revision:
- 0:40bf929b78e3
first test BED and HEAD0 MOSFETS
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
chalikias | 0:40bf929b78e3 | 1 | #include "mbed.h" |
chalikias | 0:40bf929b78e3 | 2 | |
chalikias | 0:40bf929b78e3 | 3 | DigitalOut BED(PC_9); |
chalikias | 0:40bf929b78e3 | 4 | DigitalOut HEAD0(PC_8); |
chalikias | 0:40bf929b78e3 | 5 | |
chalikias | 0:40bf929b78e3 | 6 | int main() { |
chalikias | 0:40bf929b78e3 | 7 | while(1) { |
chalikias | 0:40bf929b78e3 | 8 | HEAD0 = 1; // LED is ON |
chalikias | 0:40bf929b78e3 | 9 | BED =0; |
chalikias | 0:40bf929b78e3 | 10 | wait(0.1); // 200 ms |
chalikias | 0:40bf929b78e3 | 11 | HEAD0 = 0; // LED is OFF |
chalikias | 0:40bf929b78e3 | 12 | BED=1; |
chalikias | 0:40bf929b78e3 | 13 | wait(0.1); // 1 sec |
chalikias | 0:40bf929b78e3 | 14 | } |
chalikias | 0:40bf929b78e3 | 15 | } |