Go to Post I think it would be beneficial for us frogs to be in the new hopper division - zsm150 [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 28-01-2009, 05:24
alaa abo alheja's Avatar
alaa abo alheja alaa abo alheja is offline
Registered User
FRC #1946 (Mishka Monsters)
Team Role: Programmer
 
Join Date: Jan 2008
Rookie Year: 2008
Location: Israel
Posts: 9
alaa abo alheja is an unknown quantity at this point
Send a message via MSN to alaa abo alheja
can anyone help me to get gyro c++ code?

in this year my team Decide to use the gyro sensor,can anyone give us the c++ program of rhe gyro sensor with robotdrive 4 mottors??
Reply With Quote
  #2   Spotlight this post!  
Unread 29-01-2009, 09:26
alaa abo alheja's Avatar
alaa abo alheja alaa abo alheja is offline
Registered User
FRC #1946 (Mishka Monsters)
Team Role: Programmer
 
Join Date: Jan 2008
Rookie Year: 2008
Location: Israel
Posts: 9
alaa abo alheja is an unknown quantity at this point
Send a message via MSN to alaa abo alheja
Re: can anyone help me to get gyro c++ code?

here i have the c code of the gyro sensor, can anyone help me to make it work with 4 mottors?

Code:
float get_angular_velocity(){
    float omega_rad_per_sec, omega_deg_per_sec, u;
    u = (float) SensorRaw[S1];                   // sensor port 1 is used for CRS03-02
    omega_deg_per_sec =(u/1023*5 - 2.5)/0.02;    // angular velocity(deg/s)
    omega_rad_per_sec =omega_deg_per_sec/180*PI; // angular velocity(rad/s)
    return(omega_rad_per_sec);
}
 
task main()
{
    float omega;
    motor[motorA] = 100;    // power supply for voltage regulator 
    while(1){
        omega =get_angular_velocity();
    }
}
plz all who can help give their help to me.
thank u for all
Reply With Quote
  #3   Spotlight this post!  
Unread 29-01-2009, 13:14
gokul gokul is offline
Registered User
FRC #0571
 
Join Date: Jan 2006
Location: CT
Posts: 25
gokul is an unknown quantity at this point
Re: can anyone help me to get gyro c++ code?

Look for FRC Gyro Sample Program in Windriver.

File > New > Example > ....kernal module... >

Open that project and look at GyroSample.cpp as an example.

Hope this helps.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
For anyone who doesn't get the camera code..... Jake M Programming 8 16-01-2006 18:56
Wierd gyro code problems...pls help Salik Syed Programming 4 14-03-2004 01:29
Can someone get me the code for... HuskieRobotics Programming 4 11-03-2004 17:13
Can anyone tell me the proper code for line sensors thelastride Programming 1 14-02-2004 13:47
Anyone know where I can get a sample.. Jason_384 General Forum 4 30-01-2002 23:04


All times are GMT -5. The time now is 12:50.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi