Go Down

Topic: need help (Read 1 time) previous topic - next topic

retrolefty

CR....yellow text on light grey background just doesn't work.... :D

CrossRoads

#6
Feb 06, 2011, 02:46 am Last Edit: Feb 06, 2011, 02:56 am by CrossRoads Reason: 1
Sorry, was trying to highlight, got the wrong thing I guess. Let me see if I can edit.

no more [highlight] test [/highlight] ??
red shadow >> not seeing any difference with shadow
red glow  this just looks blurry

We need the highlight option back.
Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

pittom

ok i still get error here is the new one

/*


4 inputs with with (and &&) and 2 outputs


*/

// set pin numbers:
int rredPin1 = 2;      /*come in from rovio
int rblackPin2 = 3;     *
int lredPin3 = 4;       *
int lblackPin4 = 5;     *
int fwheelPin =  10;      // out to wheels
int rwheelpin =  8;
// variables will change:
int rredState1 = 0;         /* variable for reading rovio status
int rblackState2 = 0;        *
int lredState3 = 0;          *
int lblackState4 = 0;        */
void setup() {
   // initialize the pin as an output and input
  pinMode(10, OUTPUT);
  pinMode(8, OUTPUT);
  pinMode(3, INPUT);
  pinMode(4, INPUT);
  pinMode(5, INPUT);
  pinMode(2, INPUT);     
}

void loop(){
  // read rovio input
  rredState1 = digitalRead(rredPin1);
  rblackState2 = digitalRead(rblackPin2);
   lredState3 = digitalRead(lredPin3);
   lblackState4 = digitalRead(lblackPin4);
 
  // if it is, then it is high
  if (rredState1 == HIGH && rblackState2 == HIGH){
   
    // turn LED on:   
    digitalWrite(fwheelPin, HIGH);
  }
  else {
     // turn LED off:
    digitalWrite(fwheelPin1, LOW); 
  }


 
  if (lredState3 == HIGH && lblackState4 == HIGH) {     
    // turn LED on:       
    digitalWrite(rwheelPin, HIGH);
  }
  else {
   
    digitalWrite(rwheelPin, LOW);
  }
}









bobo_bot_wont_work.cpp: In function 'void loop()':
bobo_bot_wont_work:32: error: 'rredState1' was not declared in this scope
bobo_bot_wont_work:33: error: 'rblackState2' was not declared in this scope
bobo_bot_wont_work:33: error: 'rblackPin2' was not declared in this scope
bobo_bot_wont_work:34: error: 'lredState3' was not declared in this scope
bobo_bot_wont_work:34: error: 'lredPin3' was not declared in this scope
bobo_bot_wont_work:35: error: 'lblackState4' was not declared in this scope
bobo_bot_wont_work:35: error: 'lblackPin4' was not declared in this scope
bobo_bot_wont_work:41: error: 'fwheelPin' was not declared in this scope
bobo_bot_wont_work:45: error: 'fwheelPin1' was not declared in this scope
bobo_bot_wont_work:52: error: 'rwheelPin' was not declared in this scope
bobo_bot_wont_work:56: error: 'rwheelPin' was not declared in this scope

CrossRoads

the line where you have
/*
everything between that and
*/
is considered a comment.
Fix that stuff up.
If you  want a comment on an indivual line, put // and then your comment
Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

pittom

ok found one fix /* insted of //* but now cnat find fix for
56: error: 'rwheelPin' was not declared in this scope

Go Up