Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Arduino - tutorijali, pitanja, primjeri i projekti
I opet da ti napomenem, C nije BASIC!
Zaboravi na goto!!!

Ovaj poslednji snipet koji si postavio je teška katastrofa, mada je očigledno napisan da pokaže kako NE TREBA pisati program.

Code:
void changePinState(int pin)
{
  int state = digitalRead(pin);
  if (state == HIGH)
  {
    state = LOW;
  }
  else
  {
    state = HIGH;
  }
  digitalWrite(pin, state);
}
Make no mistake between my personality and my attitude.
My personality is who I am.
My attitude depends on who you are.

塞爾維亞文
Reply


Messages In This Thread
RE: Arduino - tutorijali, pitanja, primjeri i projekti - by ZASto - 05-08-2021, 07:17 PM

Forum Jump:


Users browsing this thread: 6 Guest(s)