Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "mbed.h"
- AnalogOut Aout(p18); //create an analog output on pin 18
- void out1(float vol)
- {
- Aout = vol;
- wait_us(100);
- }
- int main()
- {
- int vol;
- while(1)
- {
- for(vol = 0; vol <10; vol++)
- {
- out1(vol*0.1);
- }
- }
- }
Add Comment
Please, Sign In to add comment