Mirza Mesic
/
tinf_AnalogOut
AnalogOut_Test
main.cpp@0:29c5763c6e13, 2019-12-09 (annotated)
- Committer:
- mirzamesic
- Date:
- Mon Dec 09 17:17:10 2019 +0000
- Revision:
- 0:29c5763c6e13
ver1
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mirzamesic | 0:29c5763c6e13 | 1 | #include "mbed.h" |
mirzamesic | 0:29c5763c6e13 | 2 | |
mirzamesic | 0:29c5763c6e13 | 3 | AnalogOut Aout(p18); // Kopfhörer |
mirzamesic | 0:29c5763c6e13 | 4 | AnalogIn pot1(p19); |
mirzamesic | 0:29c5763c6e13 | 5 | |
mirzamesic | 0:29c5763c6e13 | 6 | int main() { |
mirzamesic | 0:29c5763c6e13 | 7 | while(1) { |
mirzamesic | 0:29c5763c6e13 | 8 | Aout = pot1.read(); // Lautstärke |
mirzamesic | 0:29c5763c6e13 | 9 | wait_us(1000); // Frequenz |
mirzamesic | 0:29c5763c6e13 | 10 | Aout = 0; |
mirzamesic | 0:29c5763c6e13 | 11 | wait_us(1000); |
mirzamesic | 0:29c5763c6e13 | 12 | } |
mirzamesic | 0:29c5763c6e13 | 13 | } |