View unanswered posts | View active topics It is currently Sun Jan 26, 2020 11:29 am

 Page 1 of 1 [ 9 posts ]
 Print view Previous topic | Next topic
HiTechnic Gyro Sensor
Author Message
Rookie

Joined: Thu Sep 29, 2011 11:07 pm
Posts: 5
HiTechnic Gyro Sensor
I want to know exactly, what does the gyro sensor do? I've been told that it is helpful when you are trying to turn. How do you use it to turn?

Thu Sep 29, 2011 11:28 pm
Guru

Joined: Sun Nov 15, 2009 5:46 am
Posts: 1523
Re: HiTechnic Gyro Sensor
The gyro will give you the turning rate, meaning you have a higher value if the robot is turning faster, a lower value if it turns slower and zero when it is not turning (degrees/second). If you turn in opposite direction, you get a negative value. So if you integrate the "angular velocity" against time, you can keep track of the current heading.
For example, let's say your robot is heading north and not moving and you set the currentHeading to zero. Then the robot starting moving at a constant velocity clockwise at 30-degree/second for 3 seconds. If you integrate that (30 degree/sec * 3 second) = 90 degree. So at the end of the 3 seconds, your robot is facing east.
So if you want to turn your robot clockwise for 90 degrees, you turn the robot until your heading value reaches 90 degrees. If you want to turn your robot anticlockwise for 90 degrees, you turn the robot until your heading value reaches -90 degrees.

Fri Sep 30, 2011 12:15 am
Rookie

Joined: Thu Sep 29, 2011 11:07 pm
Posts: 5
Re: HiTechnic Gyro Sensor
So how would you exactly program the robot to do this. I under stand it now. Thank you for replying.

Fri Sep 30, 2011 8:46 am

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3654
Location: Rotterdam, The Netherlands
Re: HiTechnic Gyro Sensor
I have some code that uses the gyro to calculate current heading in this article: http://botbench.com/blog/2010/09/22/rot ... it-mobile/

Go check it out

- Xander

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]

Fri Sep 30, 2011 8:50 am
Rookie

Joined: Thu Sep 29, 2011 11:07 pm
Posts: 5
Re: HiTechnic Gyro Sensor
Ok. Thank you for that link it helped a lot. One other question. How would I program the robot to turn 90 degrees using this sensor.

Tue Oct 04, 2011 12:04 pm

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3654
Location: Rotterdam, The Netherlands
Re: HiTechnic Gyro Sensor
Why not try to make a program for a robot that turns very slowly and shows you its current heading on the screen. Once you have that working, I am sure the rest will come to you.

- Xander

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]

Tue Oct 04, 2011 12:14 pm
Rookie

Joined: Tue Jan 10, 2012 8:25 pm
Posts: 1
Re: HiTechnic Gyro Sensor
I'm a complete noob. I've been using RobotC for all of three weeks and my mentor needs me to program a gyro sensor to make a 90 degree turn. I know how a gyro sensor works but I dont really know how to integrate the time into the gyro readings and correlate them to the motor speeds. Any help would be appreciated. I've attached my robot's configuration. An explanation of commands used would be even better. Thanks in advance.

-Matt

 Attachments: File comment: Robot's config (motors and sensors) online sample.c [535 Bytes] Downloaded 1199 times
Tue Jan 17, 2012 6:31 pm
Guru

Joined: Sun Nov 15, 2009 5:46 am
Posts: 1523
Re: HiTechnic Gyro Sensor
viewtopic.php?f=52&t=3152

Tue Jan 17, 2012 7:33 pm
Rookie

Joined: Tue Aug 27, 2013 10:59 am
Posts: 4
Re: HiTechnic Gyro Sensor
Hey Guys well i think that gyroscope sensor has the following features:
Measurement variety, Number of detecting axes.Thanks!!

Tue Aug 27, 2013 11:11 am
Display posts from previous:  Sort by
 Page 1 of 1 [ 9 posts ]

Who is online

Users browsing this forum: No registered users and 2 guests

 You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum

Search for:
 Jump to:  Select a forum ------------------ ROBOTC Applications    ROBOTC for LEGO MINDSTORMS       Third-party sensors    ROBOTC for CORTEX & PIC    ROBOTC for VEX IQ    ROBOTC for Arduino    Robot Virtual Worlds    Multi-Robot Communications    Issues and Bugs Competitions & Partners    Mini Urban Challenge    CS2N Robot Virtual Worlds Competitions       VEX Skyrise Competition 2014-2015       VEX Toss Up 2013-2014       FTC Block Party! 2013-2014    Competitions using VEX - BEST, TSA, VEX, and RoboFest!    FTC Programming    RoboCup Junior and Other ROBOT Competitions Virtual Brick Robotics Discussions    General Discussions    Project Discussions Off-Topic ROBOTC Forum & ROBOTC.net Suggestions/Feedback    ROBOTC Forums Suggestions/Comments    ROBOTC.net Suggestions/Comments       NXT Programming: Tips for Beginning with ROBOTC       VEX Programming: Tips for Beginning with ROBOTC    2013 Robotics Summer Of Learning       VEX Toss Up Programming Challenge       FTC Ring It Up! Programming Challenge    International Forums       Spanish Forums          ROBOTC for MINDSTORMS          ROBOTC for VEX       French Forums          ROBOTC pour Mindstorms          ROBOTC pour IFI VEX       Japanese Forums （日本語のフォーラム）       German Forums    2015 Spring Carnival Event    PLTW (Project Lead The Way)    Robotics Merit Badge    2014 Robotics Academy Summer of Learning