Jump to content

Matze

Members
  • Content Count

    3
  • Joined

  • Last visited

  1. Matze

    Compile error

    How can I fix it? Do i need more RAM?
  2. Matze

    Compile error

    What does it say? I don't understand.
  3. Matze

    Compile error

    Hello guys, I need help. I trust to program one LED with three Buttons on an MSP430, but when I compile the programme it shows an error. I have no Idea. In the following document you can see the code and the error report. Thank you. int R1 = P2_1; // LED Rot int G1 = P2_0; // LED Grün int Blau1 = P1_5; // LED Blau int T1 = P1_4; // Taster 1 int T2 = P1_3; // Taster 2 int T3 = P1_2; // Taster 3 int Time = 300; // Variable 1 int Zeit = 100; // Variable 2 void setup() { pinMode(R1, OUTPUT); pinMode(G1, OUTPUT); pinMode(Blau1, OUTPUT); pinMode (T1, INPUT_PULLUP); pinMode (T2, INPUT_PULLUP); pinMode (T3, INPUT_PULLUP); } void loop() { if(digitalRead(T1)==LOW) { int i; for(i=0;i<=30;i++){ digitalWrite(Blau1,HIGH); delay(50); digitalWrite(Blau1,LOW); delay(50); int i =+ 1; } for(i=0;i<=30;i++){ digitalWrite(R1,HIGH); delay(50); digitalWrite(R1,LOW); delay(50); int i =+ 1; } for(i=0;i<=30;i++){ digitalWrite(G1,HIGH); delay(50); digitalWrite(G1,LOW); delay(50); int i =+ 1; } } else{ digitalWrite(G1,LOW); digitalWrite(R1,LOW); digitalWrite(Blau1,LOW); } if(digitalRead(T2)==LOW) { digitalWrite(R1,HIGH); delay(Time); digitalWrite(R1,LOW); delay(Zeit); digitalWrite(R1,HIGH); delay(Time); digitalWrite(R1,LOW); delay(Zeit); digitalWrite(Blau1,HIGH); delay(Time); digitalWrite(Blau1,LOW); delay(Zeit); digitalWrite(Blau1,HIGH); delay(Time); digitalWrite(Blau1,LOW); delay(Zeit); digitalWrite(G1,HIGH); delay(Time); digitalWrite(G1,LOW); delay(Zeit); digitalWrite(G1,HIGH); delay(Time); digitalWrite(G1,LOW); delay(Zeit); digitalWrite(Blau1,HIGH); delay(Time); digitalWrite(Blau1,LOW); delay(Zeit); digitalWrite(Blau1,HIGH); delay(Time); digitalWrite(Blau1,LOW); digitalWrite(R1,HIGH); delay(Time); digitalWrite(R1,LOW); delay(Zeit); digitalWrite(R1,HIGH); delay(Time); digitalWrite(R1,LOW); delay(Zeit); digitalWrite(Blau1,HIGH); delay(Time); digitalWrite(Blau1,LOW); delay(Zeit); digitalWrite(Blau1,HIGH); delay(Time); digitalWrite(Blau1,LOW); delay(Zeit); digitalWrite(G1,HIGH); delay(Time); digitalWrite(G1,LOW); delay(Zeit); digitalWrite(G1,HIGH); delay(Time); digitalWrite(G1,LOW); delay(Zeit); digitalWrite(Blau1,HIGH); delay(Time); digitalWrite(Blau1,LOW); delay(Zeit); digitalWrite(Blau1,HIGH); delay(Time); digitalWrite(Blau1,LOW); } if(digitalRead(T3)==LOW) { digitalWrite(R1,HIGH); delay(Time); digitalWrite(G1,HIGH); delay(Time); digitalWrite(R1,LOW); delay(Time); digitalWrite(Blau1,HIGH); delay(Time); digitalWrite(G1,LOW); delay(Time); digitalWrite(R1,HIGH); delay(Time); digitalWrite(R1,LOW); digitalWrite(Blau1,LOW); delay(Time); } else{ digitalWrite(G1,LOW); digitalWrite(R1,LOW); digitalWrite(Blau1,LOW); } } JUSTUS.ino Neues Textdokument.txt
×
×
  • Create New...