derleme sırasında hata ayıklama sorunları
  • merhabalar; örnek bir yazılım buldum fakat derleme sırasında program hata ayıklama sırasında aşağıdaki yazılım hatasını vermekte void loop() { /// Multiplexer read alle for (int countM=0; countM<8; countM++) { rowM = bin[countM]; rm0 = rowM & 0×01; hata veren satır1 rm1 = (rowM>>1) & 0×01; hata veren satır2 rm2 = (rowM>>2) & 0×01; hata veren satır3 digitalWrite(mS0, rm0); digitalWrite(mS1, rm1); digitalWrite(mS2, rm2); for (int countS=0; countS<8; countS++) { rowS = bin[countS]; rs0 = rowS & 0×01; hata veren satır4 rs1 = (rowS>>1) & 0×01; hata veren satır5 rs2 = (rowS>>2) & 0×01; hata veren satır6 digitalWrite(sS0, rs0); digitalWrite(sS1, rs1); digitalWrite(sS2, rs2); -------------------------------- //clear everything out digitalWrite(myDataPin, 0); digitalWrite(myClockPin, 0); for (i=7; i>=0; i?) { hata veren satır7 digitalWrite(myClockPin, 0); if ( myDataOut & (1<<i) ) { pinState= 1; } else { pinState= 0; } //Sets the pin to HIGH or LOW depending on pinState digitalWrite(myDataPin, pinState); //register shifts bits on upstroke of clock pin digitalWrite(myClockPin, 1); //zero the data pin after shift to prevent bleed through digitalWrite(myDataPin, 0); } //stop shifting digitalWrite(myClockPin, 0); hata veren satır8 } ----------------------------------------toplam hatalar------------------------------------------- sketch_oct20c:123: error: stray '\' in program sketch_oct20c:124: error: stray '\' in program sketch_oct20c:125: error: stray '\' in program sketch_oct20c:132: error: stray '\' in program sketch_oct20c:133: error: stray '\' in program sketch_oct20c:134: error: stray '\' in program sketch_oct20c:181: error: stray '\' in program sketch_oct20c.cpp: In function 'void loop()': sketch_oct20c:123: error: expected `;' before 'u00d701' sketch_oct20c:124: error: expected `;' before 'u00d701' sketch_oct20c:125: error: expected `;' before 'u00d701' sketch_oct20c:132: error: expected `;' before 'u00d701' sketch_oct20c:133: error: expected `;' before 'u00d701' sketch_oct20c:134: error: expected `;' before 'u00d701' sketch_oct20c.cpp: In function 'void shiftOut(int, int, byte)': sketch_oct20c:181: error: expected `)' before 'u2013' sketch_oct20c:181: error: 'u2013' was not declared in this scope sketch_oct20c:181: error: expected `;' before ')' token sketch_oct20c:198: error: expected `}' at end of input ----------------------------------------programın tamamı--------------------------------------- int dataPin = 10; //DS int latchPin = 9; //ST int clockPin = 8; //SH int sS0 = 7; //sS0 int sS1 = 6; //sS1 int sS2 = 5; //sS2 int mS0 = 4; //mS0 int mS1 = 3; //mS1 int mS2 = 2; //mS2 // Pinf for the Status LED int led = 13; // Pin for the IR LEDs int LEDpin = 11; // Analog Inputs von den Fototransistoren int analogInput = 0; // variable to store the value int values0[] = { 0, 0, 0, 0, 0, 0, 0, 0}; int values1[] = { 0, 0, 0, 0, 0, 0, 0, 0}; int values2[] = { 0, 0, 0, 0, 0, 0, 0, 0}; int values3[] = { 0, 0, 0, 0, 0, 0, 0, 0}; int values4[] = { 0, 0, 0, 0, 0, 0, 0, 0}; int values5[] = { 0, 0, 0, 0, 0, 0, 0, 0}; int values6[] = { 0, 0, 0, 0, 0, 0, 0, 0}; int values7[] = { 0, 0, 0, 0, 0, 0, 0, 0}; int values[8][8]; //display int counters[8][8];//storrage // a threshold to decide when the LED turns on 512 normal int threshold = 700; int timer = 0; //holders for infromation you?re going to pass to shifting function byte dataRED; byte dataGREEN; byte dataArrayRED[8]; byte dataArrayGREEN[8]; //alles für den multiplexer int rm0 = 0; // value Master 4051 (s0) int rm1 = 0; // value Master 4051 (s1) int rm2 = 0; // value Master 4051 (s2) int rowM = 0; // storeing the bin code int bin [] = { 000, 1, 10, 11, 100, 101, 110, 111};//bin = binär, some times it is so easy int rs0 = 0; // value Slave 4051 (s0) int rs1 = 0; // value Slave 4051 (s1) int rs2 = 0; // value Slave 4051 (s2) int rowS = 0; // storeing the bin code void setup() { //multiplexer pinMode(mS0, OUTPUT); // Master s0 pinMode(mS1, OUTPUT); // Master s1 pinMode(mS2, OUTPUT); // Master s2 pinMode(sS0, OUTPUT); // Slave s0 pinMode(sS1, OUTPUT); // Slave s1 pinMode(sS2, OUTPUT); // Slave s2 digitalWrite(led, HIGH); //die kontroll LED //set pins to output because they are addressed in the main loop pinMode(latchPin, OUTPUT); //set the pin for the IR LEDs pinMode(LEDpin, OUTPUT); digitalWrite(LEDpin, HIGH); // Analog Inputs von den Fototransistoren pinMode(analogInput, INPUT); dataArrayGREEN[0] = 254; dataArrayGREEN[1] = 253; dataArrayGREEN[2] = 251; dataArrayGREEN[3] = 247; dataArrayGREEN[4] = 239; dataArrayGREEN[5] = 223; dataArrayGREEN[6] = 191; dataArrayGREEN[7] = 127; for(int j = 0; j < 8; j++){ values[0][j] = values0[j]; values[1][j] = values1[j]; values[2][j] = values2[j]; values[3][j] = values3[j]; values[4][j] = values4[j]; values[5][j] = values5[j]; values[6][j] = values6[j]; values[7][j] = values7[j]; } for(int i = 0; i < 8; i++){ for(int j = 0; j < 8; j++){ counters[i][j] = 0; } } } void loop() { /// Multiplexer read alle for (int countM=0; countM<8; countM++) { rowM = bin[countM]; rm0 = rowM & 0×01; rm1 = (rowM>>1) & 0×01; rm2 = (rowM>>2) & 0×01; digitalWrite(mS0, rm0); digitalWrite(mS1, rm1); digitalWrite(mS2, rm2); for (int countS=0; countS<8; countS++) { rowS = bin[countS]; rs0 = rowS & 0×01; rs1 = (rowS>>1) & 0×01; rs2 = (rowS>>2) & 0×01; digitalWrite(sS0, rs0); digitalWrite(sS1, rs1); digitalWrite(sS2, rs2); if(values[countS][countM] == 1) { counters[countS][countM] = counters[countS][countM] + 1; } if( counters[countS][countM] > 50) { counters[countS][countM] = 0; values[countS][countM] = 0; } if ( analogRead(analogInput) < threshold) { // macht die umschaltung if(values[countS][countM] == 0) { values[countS][countM] = 1; } } dataArrayRED[countS] = values[countS][0]*1+values[countS][1]*2+values[countS][2]*4+values[countS][3]*8+values[countS][4]*16+values[countS][5]*32+values[countS][6]*64+values[countS][7]*128; //ground latchPin and hold low for as long as you are transmitting digitalWrite(latchPin, 0); //move ?em out shiftOut(dataPin, clockPin, dataArrayGREEN[countS]); shiftOut(dataPin, clockPin, dataArrayRED[countS]); //return the latch pin high to signal chip that it //no longer needs to listen for information digitalWrite(latchPin, 1); } } } // the heart of the program void shiftOut(int myDataPin, int myClockPin, byte myDataOut) { //internal function setup int i=0; int pinState; pinMode(myClockPin, OUTPUT); pinMode(myDataPin, OUTPUT); //clear everything out digitalWrite(myDataPin, 0); digitalWrite(myClockPin, 0); for (i=7; i>=0; i?) { digitalWrite(myClockPin, 0); if ( myDataOut & (1<<i) ) { pinState= 1; } else { pinState= 0; } //Sets the pin to HIGH or LOW depending on pinState digitalWrite(myDataPin, pinState); //register shifts bits on upstroke of clock pin digitalWrite(myClockPin, 1); //zero the data pin after shift to prevent bleed through digitalWrite(myDataPin, 0); } //stop shifting digitalWrite(myClockPin, 0); }
  • Koddan <br /> yazan kısımları çıkarıp tekrar dener misin...
  • hata veren satırları sildiğimde herhangi bir problem yok yazılım derleme işlemi tamamlanıyor. yalnız hata veren satırları silmem çalışma akışını etkileyebilir mi?
  • Sadece " br /" yazan kısımları çıkarıp denediniz mi? başında ve sonunda < ve > karakterleri ile birlikte...

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Açık kaynak kültürü gereği, çözdüğünüz problemlerin çözümlerini paylaşmayı lütfen unutmayın.