Home

Main Menu

Who's Online

We have 16 guests and 7 members online
  • Robotactor
  • Sazabi
  • 27Loco
  • jdeenen
  • i-Bot
  • joao.silva
  • SoBot

Login Form






Lost Password?
No account yet? Register

Find us on Facebook

Welcome ( Log in )
Need help with HSR8498, plz

 
Post new topic   Reply to topic    RoboSavvy Forum Forum Index -> Roboard - x86 Embedded Robot Board
View previous topic :: View next topic  
Author Message
Sazabi
Savvy Roboteer
Savvy Roboteer


Joined: 07 Jan 2008
Posts: 68

PostPosted: Fri Feb 05, 2010 11:05 pm    Post subject: Need help with HSR8498, plz Reply with quote

That's me again)
I did everything I could imagine,but couldn't make servo move(
That's the code I used:
Code:

#include "stdafx.h"
#include "rcservo.h"
#include "roboard.h"

int _tmain(int argc, _TCHAR* argv[])
{
   if (rcservo_Initialize(RCSERVO_USECHANNEL0))
   {
      printf("Channels 0 initialized");
      rcservo_EnterCaptureMode();
      rcservo_SetServo(0, RCSERVO_HITEC_HSR8498);
      unsigned long pos = rcservo_ReadPosition(0,0);
      unsigned long motion[32]={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
      motion[1]=2300;
      rcservo_EnterPlayMode();
      rcservo_SetAction (motion, 500);
      while (rcservo_PlayAction() != RCSERVO_PLAYEND)
      {
      }
      rcservo_EnterPWMMode();
      unsigned long PWM_period = 10000;
      unsigned long PWM_duty = 1700;
      unsigned long count = 100;
      rcservo_SendPWMPulses(0, PWM_period, PWM_duty, count);
      while(!rcservo_IsPWMCompleted(0))
      {
      }
      rcservo_Close();
   }
   return 0;
}


At the end of this sode I receive this:
channels 0 initialized ( that's programmed by me)
Warning! rcservo_readPositions_PlayMode() fails to read channel 0! (and this appears everytime I try to use PlayMode).
When I try to use RoboRC.exe, it says channels can't be raed. No Idea why.
I use 2 pcs of 7.4V Li-Pos, total of 4Amp/h, HSR8498 does support 7.4V.
What could be the problem?
Back to top
View user's profile Send private message  
Sazabi
Savvy Roboteer
Savvy Roboteer


Joined: 07 Jan 2008
Posts: 68

PostPosted: Sat Feb 06, 2010 11:52 am    Post subject: Reply with quote

Tried romayiii's code from another thread - got the same error "rcservo_readPositions_PlayMode() fails to read channel 0!". If I comment "rcservo_EnterPlayMode();" no error appear, but nothing else happens.
Back to top
View user's profile Send private message  
Sazabi
Savvy Roboteer
Savvy Roboteer


Joined: 07 Jan 2008
Posts: 68

PostPosted: Sun Feb 07, 2010 8:55 pm    Post subject: Reply with quote

Ok, never mind it. Solved)
Back to top
View user's profile Send private message  
Display posts from previous:   
Post new topic   Reply to topic    RoboSavvy Forum Forum Index -> Roboard - x86 Embedded Robot Board All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Robonova Humanoid Bioloid Comprehensive Kit Robobuilder 5710K Humanoid Robobuilder 5720T Humanoid MechRC ShadowStalker KHR 1 HV and KHR 2 HV Humanoids KHR 3HV Humanoid Kit
Robonova-I
Intro | Forum | Buy
Bioloid
Intro | Forum | Buy
Robobuilder 5710K
Intro | Forum | Buy
Robobuilder 5720T
Intro | Forum | Buy
MechRC
Intro | Forum | Buy
KHR 1HV & 2HV
1HV 2HV | Forum | Buy
KHR 3HV
Intro | Forum | Buy
POBbot Wheeled Platforms (POB) POPbot Arduino Wheeled Robot Microcamp Atmega8 Activity / Introductory Kit Robobox 3 Educational Robot Kit Robotis OLLO - Starter Robotics Kits Sparkfun Products Roboard X86 Embedded Robot Board
Edu Robots
Intro | Buy
Arduino Robot
Intro | Buy
Cheap Robot
Intro | Buy
Wheeled Robot
Intro | Buy
Kids Robots
Intro | Buy
Sparkfun Electronics
Buy
x86 Robot Board
Intro | Forum | Buy



Powered by phpBB ©

In Our Store

 

DFRobot - Romeo-All in One (Arduino Compatible Atmega 328)
£27.90   £32.78 inc. VAT
 

GoogleSearch

Google
robosavvy.com
Web


© 2010 RoboSavvy
All rights reserved. Privacy Policy.