Show Posts
Pages: 1 2 [3] 4
31  Topics / Home Automation and Networked Objects / text message on: September 23, 2011, 04:16:16 pm
I am trying to send a text to my phone(number@vtext.com)when a pin goes high but no luck.Does anyone get this to work
thanks tom
32  Topics / Robotics / rc car with arduino on: February 20, 2011, 07:56:12 am
i have a rc car and want to run it with rc remote and not home run over the web.But if the power for motor and servo come from rc battery and i have the signal wire on rc reciver and arduino tied together will that damage the arduino board? shouild i use a diod coming off the arduino.
33  Using Arduino / Programming Questions / TouchOSC for Android on: February 16, 2011, 06:38:31 pm
Did anyone try this and get it to work
34  Using Arduino / Programming Questions / Re: what did i do wrong on: February 09, 2011, 09:45:38 pm
ok thanks
35  Using Arduino / Programming Questions / what did i do wrong on: February 09, 2011, 08:53:44 pm
ok her goes  I have a rovio robot and am trying to make it a 4x4 for out doors,i now have +5volts on input that come from rovio wheels going into arduino inputs and the out put pins going to rc 4x4. Now my problem is i have +5 to +6 volts at the pin inputs but am only getting +2.45volts out for the fwheelpin and rwheelpin put,lturn and rturn i get +5volts on all out put pins like i should and does run the wheels on rc 4x4. is there something wrong wih my program? i tried 2 different ones and same problem.
Code:
/*
                                      program 1
 
 
 4 inputs with with (and &&) and 2 outputs
 

 */
 
// set pin numbers:
 int redpin = A3;      // 2red come in from rovio
 int bluepin = A2;    // 3blue
 int blackpin = A1;     // 4black  
 int greenpin = A0;   // 5green  
 int fwheelpin =  2;      // out to wheels
 int rwheelpin =  4;
 int lturn = 7;
 int rturn = 8;
// variables will change:
int redState = 0;         // variable for reading rovio status
int blueState = 0;        
int blackState = 0;          
int greenState = 0;        
void setup() {
   // initialize the pin as an output and input
  pinMode(8, OUTPUT);
  pinMode(4,OUTPUT);
  pinMode(7, OUTPUT);
  pinMode(2,OUTPUT);
  pinMode(A3, INPUT);
  pinMode(A2, INPUT);
  pinMode(A1, INPUT);
  pinMode(A0, INPUT);
    
}

void loop(){
  // read rovio input
  redState = analogRead(redpin);
  blueState = analogRead(bluepin);
   blackState = analogRead(blackpin);
   greenState = analogRead(greenpin);
  
  // forward, then it is high
  if (redState >100 && greenState >100){  
    
    // turn LED on:    
    digitalWrite(fwheelpin, HIGH);
 
  }
  else {
     // turn LED off:
    digitalWrite(fwheelpin, LOW);  
  }
  // revers high
  if (blueState >350 && greenState >350){
    
    //turn on
    digitalWrite(rwheelpin,HIGH);
  }

  else{
    //turn off
    digitalWrite(rwheelpin,LOW);
  }

  //turn left
  if (redState >350 && blackState >350){
    digitalWrite(rwheelpin,HIGH);
    digitalWrite(lturn,HIGH);
    
  }
  else{
     digitalWrite(rwheelpin,LOW);
      digitalWrite(lturn,LOW);
}
  //turn right
  if(blueState >200 && greenState >200){
    digitalWrite(fwheelpin,HIGH);
    digitalWrite(rturn,HIGH);
    
  }
  else{
     digitalWrite(fwheelpin,LOW);
      digitalWrite(rturn,LOW);
}
}


                    prgram2
/*
 
 
 4 inputs with with (and &&) and 2 outputs
 

 */
 
// set pin numbers:
 int redpin = 2;      //come in from rovio
 int bluepin = 3;    
 int blackpin = 4;      
 int greenpin = 5;    
 int fwheelpin =  8;      // out to wheels
 int rwheelpin =  9;
 int lturn = 10;
 int rturn = 7;
// variables will change:
int redState = 0;         // variable for reading rovio status
int blueState = 0;        
int blackState = 0;          
int greenState = 0;        
void setup() {
   // initialize the pin as an output and input
  pinMode(10, OUTPUT);
  pinMode(9,OUTPUT);
  pinMode(8, OUTPUT);
  pinMode(7,OUTPUT);
  pinMode(3, INPUT);
  pinMode(4, INPUT);
  pinMode(5, INPUT);
  pinMode(2, INPUT);
    
}

void loop(){
  // read rovio input
  redState = digitalRead(redpin);
  blueState = digitalRead(bluepin);
   blackState = digitalRead(blackpin);
   greenState = digitalRead(greenpin);
  
  // if it is, then it is high
  if (redState == HIGH && greenState == HIGH){  
    
    // turn LED on:    
    digitalWrite(fwheelpin, HIGH);
 
  }
  else {
     // turn LED off:
    digitalWrite(fwheelpin, LOW);  
  }

 
  if (blueState == HIGH && greenState == HIGH) {    
    // turn LED on:      
    digitalWrite(rwheelpin,HIGH);

  }
  else {
    
    digitalWrite(rwheelpin,LOW);
  }
  //turn left
  if(redState == HIGH && blackState == HIGH){
    digitalWrite(rwheelpin,HIGH);
    digitalWrite(lturn,HIGH);
    
  }
  else{
     digitalWrite(rwheelpin,LOW);
      digitalWrite(lturn,LOW);
}
  //turn right
  if(blueState == HIGH && greenState == HIGH){
    digitalWrite(fwheelpin,HIGH);
    digitalWrite(rturn,HIGH);
    
  }
  else{
     digitalWrite(fwheelpin,LOW);
      digitalWrite(rturn,LOW);
}
}
 
 
36  Using Arduino / Programming Questions / Re: 1volt input high output on: February 09, 2011, 06:46:01 pm
ok her goes  I have a rovio robot and am trying to make it a 4x4 for out doors,i now have +5volts on input that come from rovio wheels going into arduino inputs and the out put pins going to rc 4x4. Now my problem is i have +5 to +6 volts at the pin inputs but am only getting +2.45volts out for the fwheelpin and rwheelpin put,lturn and rturn i get +5volts on all out put pins like i should and does run the wheels on rc 4x4. is there something wrong wih my program? i tried 2 different ones and same problem.
                                      program one
/*
 
 
 4 inputs with with (and &&) and 2 outputs
 

 */
 
// set pin numbers:
 int redpin = 2;      //come in from rovio
 int bluepin = 3;     
 int blackpin = 4;       
 int greenpin = 5;     
 int fwheelpin =  8;      // out to wheels
 int rwheelpin =  9;
 int lturn = 10;
 int rturn = 7;
// variables will change:
int redState = 0;         // variable for reading rovio status
int blueState = 0;       
int blackState = 0;         
int greenState = 0;       
void setup() {
   // initialize the pin as an output and input
  pinMode(10, OUTPUT);
  pinMode(9,OUTPUT);
  pinMode(8, OUTPUT);
  pinMode(7,OUTPUT);
  pinMode(3, INPUT);
  pinMode(4, INPUT);
  pinMode(5, INPUT);
  pinMode(2, INPUT);
   
}

void loop(){
  // read rovio input
  redState = digitalRead(redpin);
  blueState = digitalRead(bluepin);
   blackState = digitalRead(blackpin);
   greenState = digitalRead(greenpin);
 
  // if it is, then it is high
  if (redState == HIGH && greenState == HIGH){   
   
    // turn LED on:   
    digitalWrite(fwheelpin, HIGH);
 
  }
  else {
     // turn LED off:
    digitalWrite(fwheelpin, LOW); 
  }

 
  if (blueState == HIGH && greenState == HIGH) {     
    // turn LED on:       
    digitalWrite(rwheelpin,HIGH);

  }
  else {
   
    digitalWrite(rwheelpin,LOW);
  }
  //turn left
  if(redState == HIGH && blackState == HIGH){
    digitalWrite(rwheelpin,HIGH);
    digitalWrite(lturn,HIGH);
     
  }
  else{
     digitalWrite(rwheelpin,LOW);
      digitalWrite(lturn,LOW);
}
  //turn right
  if(blueState == HIGH && greenState == HIGH){
    digitalWrite(fwheelpin,HIGH);
    digitalWrite(rturn,HIGH);
     
  }
  else{
     digitalWrite(fwheelpin,LOW);
      digitalWrite(rturn,LOW);
}
}


                              program 2
/*
 
 
 4 inputs with with (and &&) and 2 outputs
 

 */
 
// set pin numbers:
 int redpin = A3;      // 2red come in from rovio
 int bluepin = A2;    // 3blue
 int blackpin = A1;     // 4black 
 int greenpin = A0;   // 5green 
 int fwheelpin =  2;      // out to wheels
 int rwheelpin =  4;
 int lturn = 7;
 int rturn = 8;
// variables will change:
int redState = 0;         // variable for reading rovio status
int blueState = 0;       
int blackState = 0;         
int greenState = 0;       
void setup() {
   // initialize the pin as an output and input
  pinMode(8, OUTPUT);
  pinMode(4,OUTPUT);
  pinMode(7, OUTPUT);
  pinMode(2,OUTPUT);
  pinMode(A3, INPUT);
  pinMode(A2, INPUT);
  pinMode(A1, INPUT);
  pinMode(A0, INPUT);
   
}

void loop(){
  // read rovio input
  redState = analogRead(redpin);
  blueState = analogRead(bluepin);
   blackState = analogRead(blackpin);
   greenState = analogRead(greenpin);
 
  // forward, then it is high
  if (redState >100 && greenState >100){   
   
    // turn LED on:   
    digitalWrite(fwheelpin, HIGH);
 
  }
  else {
     // turn LED off:
    digitalWrite(fwheelpin, LOW); 
  }
  // revers high
  if (blueState >350 && greenState >350){
   
    //turn on
    digitalWrite(rwheelpin,HIGH);
  }

  else{
    //turn off
    digitalWrite(rwheelpin,LOW);
  }

  //turn left
  if (redState >350 && blackState >350){
    digitalWrite(rwheelpin,HIGH);
    digitalWrite(lturn,HIGH);
     
  }
  else{
     digitalWrite(rwheelpin,LOW);
      digitalWrite(lturn,LOW);
}
  //turn right
  if(blueState >200 && greenState >200){
    digitalWrite(fwheelpin,HIGH);
    digitalWrite(rturn,HIGH);
     
  }
  else{
     digitalWrite(fwheelpin,LOW);
      digitalWrite(rturn,LOW);
}
}
 
37  Using Arduino / Programming Questions / - voltage on input on: February 09, 2011, 01:20:50 am
how can i use a - voltage on input to make high on output
38  Using Arduino / Programming Questions / Re: 1volt input high output on: February 08, 2011, 10:12:08 pm
the rwheel input is a -5volts
39  Using Arduino / Programming Questions / Re: 1volt input high output on: February 08, 2011, 08:31:14 pm
ok tried but no luck,tried several diffent ways and no good.pins 10,9 go high with the 1st if statement(4volts is at input on this statement)and pin 8 is dim on turn left statement and nothing else works.  1st if statement is 4volts on both inputs and all outhers are 1.3volts to 2.3volts
40  Using Arduino / Programming Questions / Re: 1volt input high output on: February 08, 2011, 12:50:02 am
thanks guys i will try it and get some pic of project
41  Using Arduino / Programming Questions / Re: 1volt input high output on: February 08, 2011, 12:37:58 am

What is supplying the 1.3 volt signal?
it comes form my rovo like a rc car

You can read a +1.3vdc signal by wiring it to a analog input pin, it should result in about a digitalRead value of 266 counts.
i looked at this and am not sure how to do it,do you have an example to help
42  Using Arduino / Programming Questions / Re: 1volt input high output on: February 08, 2011, 12:02:17 am
i have(see) 1.3volts on input and yes how to make 1V show up as a HIGH
43  Using Arduino / Programming Questions / 1volt input high output on: February 07, 2011, 11:08:42 pm
I an confused (mabe its to late) what is the best way to program 1volt on input pin and and (5volts) high on output pin.I don't get 3v on all inputs to make output high
44  Using Arduino / Programming Questions / Re: need help on: February 06, 2011, 09:27:58 am
thank for all your help it workes now.Like i said i use to program robots in a dvd factory with ladder logic and flow charts when i was young now i am old have to learn all over a new way to have fun with my toys,it not all mechanical any more
45  Using Arduino / Programming Questions / Re: need help on: February 05, 2011, 09:45:37 pm
ok found one fix /* insted of //* but now cnat find fix for
56: error: 'rwheelPin' was not declared in this scope
Pages: 1 2 [3] 4