caramoan tour package

caramoan tour package

Author Topic: NEED HELP PO!  (Read 412 times)

Offline michael96_27

  • CR2032 Battery
  • **
  • Posts: 15
  • Pogi/Ganda Points: 0
NEED HELP PO!
« on: March 15, 2012, 07:16:22 PM »

anu po pwede kong gawin dito?;

Project:

controlling 2 servos using 2 potentiometers via bluetooth connection in arduino...

ung isa pong arduino nakaconnect sa 2 servo and ung isa sa 2 potentiometers.

may alam po b kau na way kung paano mahihiwalay ung bytes na sinesend ng dalawang potentiometer?

Nagawa ko na po kc ung isang pair ng servo and potentiometer.. di ko na po alam kung paano ako magdadagdag ng isa pang pair....


E2 po sample code ko.. pair ng servo and potentiometer:

Sender (arduino with pot):


int potPin = 0;
int buttonpin = 10;
int buttonState = 0;

void setup()
{
  pinMode(buttonpin, INPUT);
  Serial.begin(115200);
}

void loop()
{
  int potVal = analogRead(potPin);
   byte servoVal = map(potVal, 0, 1023, 0, 180);

   Serial.write(servoVal);
 
   delay(10);
   
   buttonState = digitalRead(buttonpin);
   if( buttonState == HIGH){
     Serial.print( 'w');
   }
   
   
}





Receiver(arduino with servo):


#include <Servo.h>

Servo myservo;  // create servo object to control a servo

void setup()
{
   Serial.begin(9600);
   myservo.attach(9);  // attaches the servo on pin 9 to the servo object
}

void loop()
{
   if(Serial.available() > 0)
   {
    byte servoAng = Serial.read();

    // Send the servo to the position read... <-- you get to make this happen
    myservo.write(servoAng);
   }
}




As for now, last na po ito )))
please help me po

Philippine Electronics Forum

NEED HELP PO!
« on: March 15, 2012, 07:16:22 PM »

Offline insomartin

  • Technical People
  • Nuclear Reactor
  • *****
  • Posts: 4839
  • Pogi/Ganda Points: 321
  • Gender: Male
  • Nalulunod lang...
Re: NEED HELP PO!
« Reply #1 on: March 15, 2012, 10:09:18 PM »
gandang subject para sa isang thread.
"NEED HELP PO!"
kailangan ba namin tumawag nang ambulansya iho?

Philippine Electronics Forum

Re: NEED HELP PO!
« Reply #1 on: March 15, 2012, 10:09:18 PM »

Offline michael96_27

  • CR2032 Battery
  • **
  • Posts: 15
  • Pogi/Ganda Points: 0
Re: NEED HELP PO!
« Reply #2 on: March 16, 2012, 07:32:10 PM »
urgent lang po kasi ito... Sorry po :)

Philippine Electronics Forum

Re: NEED HELP PO!
« Reply #2 on: March 16, 2012, 07:32:10 PM »

Offline motion55

  • Technical People
  • Diesel Generator
  • *****
  • Posts: 1890
  • Pogi/Ganda Points: 245
  • Gender: Male
  • Been at this longer than you've been alive.
Re: NEED HELP PO!
« Reply #3 on: March 16, 2012, 08:18:50 PM »
Kahit "urgent" yan mali pa rin.

Pag mali ang title lalong ma de-delay ang tulong.

Kita mo ngayon. Sa forum rules tayo napunta.

"Set your mind free!"

Philippine Electronics Forum

Re: NEED HELP PO!
« Reply #3 on: March 16, 2012, 08:18:50 PM »

Offline michael96_27

  • CR2032 Battery
  • **
  • Posts: 15
  • Pogi/Ganda Points: 0
Re: NEED HELP PO!
« Reply #4 on: March 17, 2012, 07:57:10 AM »
Sorry po... Ayusin ko na po next time.

Philippine Electronics Forum

Re: NEED HELP PO!
« Reply #4 on: March 17, 2012, 07:57:10 AM »

Offline e-tronix

  • Lead Acid Battery
  • *******
  • Posts: 981
  • Pogi/Ganda Points: 26
Re: NEED HELP PO!
« Reply #5 on: March 21, 2012, 04:19:08 PM »
lecture tuloy nangyari, help ang hinihingi eh.

Philippine Electronics Forum

Re: NEED HELP PO!
« Reply #5 on: March 21, 2012, 04:19:08 PM »

 

Privacy Policy

Contact Us: elabph@yahoo.com