Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Online C compiler to run C program online
- #include <stdio.h>
- #define max_kol 10
- int main() {
- // pin mode
- int pocet_kol = 0;
- for (;pocet_kol < max_kol; pocet_kol++){
- int stlaceny_enter = ananogRead(A0);
- int hodnota_tlacidlo = 0;
- int input[] = {0,0,0,0};
- while (stlaceny_enter < 1000){
- // tlacidlo 1, vstup > D2
- if (digitalRead(2) == HIGH){
- honota_tlacidlo = digitalRead(2);
- while(honota_tlacidlo == HIGH){
- honota_tlacidlo = digitalRead(2);
- delay(99);
- }
- input[0]++;
- if(input[0] > 9){
- input[0] = 0;
- }
- }
- // tlacidlo 2, VSTUP > D3
- // tlacidlo 3, VSTUP > D4
- // tlacidlo 4, VSTUP > D5
- stlaceny_enter = ananogRead(A0);
- delay(100);
- }
- }
- // Write C code here
- printf("Hello world");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement