RCU Forums - View Single Post - converting air to electric retracts.
View Single Post
Old 02-01-2014, 04:19 AM
  #38  
mustang493
Member
 
Join Date: Jan 2013
Location: cambridge, UNITED KINGDOM
Posts: 42
Likes: 0
Received 0 Likes on 0 Posts
Default

Originally Posted by freelander-rider
I have copy and pasted the edited code, but when I upload it lists error on line 34 " void loop function not in scope" and many errors on most lines after this.
I'm not sure but it would seem by removing the header "# Servo h" which I believe is from the servo library, and I assume contains commands and variables which are possibly required for the code, this may be one of the problems,
in your setup you are using servo's which have a feedback signal to operate the doors, in my setup I want to use actuators on output B for the doors rather than servo's," ie actuators 2 wire no feedback".
Would I still need the " #Servo h" header even though I wont use servo's, just to allow "#Servo h" library to send the signals and variables to action the actuators on output B.
I am still confused with other parts of the code, ie"if( updwn= =1 && senserValueB < limitB &&iB= =0)", what is this and where do the sensor values come from,I know this works with your original code.
I feel like I'm driving onto a roundabout without knowing which exit to use, I have trawled through many examples of codes and meanings, but finding it hard to correlate the various commands and variables required,to do these functions in the correct sequence.
I could do with some help with this,as I seem to be going round in circles looking for a solution.
Mike

You don't need servo library if you're not using servos. The servo library allows you to ask the servos to move to a set value or position. this is usually a value between 600 and 2400. 600 being one end of the servo travel and 2400 the other end.

( updwn= =1 && senserValueB < limitB &&iB= =0) shouldn't be a space between the 2 equals... ==. what it says is updwn must exactly equal 1 and (&&) the sensorValueB (not [COLOR=#000000]senser) must be less than(