karol przespol / pierwsze respozytorium

karolfirst

hello all

to jest muj pierwszy tekst a zarazem projekt fotka ponizej:

/media/uploads/mindstorm/0e64c2c8ef6063a1880e_1920x1200_cropromiar-niestandardowy.jpg

tu jest kod programu

include the mbed library with this snippet

// Toggle a LED
#include "mbed.h"
 
DigitalOut led1(PB_1);
DigitalOut led2(PB_2);
AnalogIn potencjometr(PB_0);
float x ;
int main() {
    led2=1;
    while(1) {
        x=potencjometr.read();
        if (x>=0.5) 
        {
                    led1 = !led1;
                    wait(0.05);
        }
        if (x<0.5) 
        {
                    led1 = !led1;
                    wait(0.3);
        }
     
    }
}

All wikipages