Armin Klačar, Emina Šarić
Embed:
(wiki syntax)
Show/hide line numbers
main.cpp
00001 #include "mbed.h" 00002 AnalogIn x(dp9); 00003 PwmOut y(dp24); 00004 BusOut ledice(dp23, dp25, dp26, dp27, dp5, dp6, dp28); 00005 DigitalOut enable(dp14); 00006 00007 int main() 00008 { 00009 enable=0; 00010 ledice=0; 00011 wait_ms(50); 00012 y.period_us(50); 00013 float x1(0.8/3.3); 00014 float z(x); 00015 while(1) 00016 { 00017 00018 if(x<x1) z=0; 00019 else z=x; 00020 y = z; 00021 } 00022 00023 }
Generated on Wed Aug 24 2022 01:03:32 by
1.7.2