ROBOTC for IFI FIRST - PowerPoint PPT Presentation

1 / 17
About This Presentation
Title:

ROBOTC for IFI FIRST

Description:

Encoder Go Straight Demo. Accelerometer Introduction. Wireless Feedback via LEDs ... If left wheel lags behind, slow down right wheel ... – PowerPoint PPT presentation

Number of Views:88
Avg rating:3.0/5.0
Slides: 18
Provided by: robotics
Category:

less

Transcript and Presenter's Notes

Title: ROBOTC for IFI FIRST


1
ROBOTC for IFI - FIRST
  • Timothy Friez
  • Class 3
  • 1/29/08

2
Outline for Tonight
  • Questions from Last Week
  • IR Board review
  • Encoder Go Straight Demo
  • Accelerometer Introduction
  • Wireless Feedback via LEDs
  • 10 minute break - Going to actually be 10
    minutes!
  • Gyro Sensor
  • Purpose
  • How it works
  • Testing and Developing a Program
  • Questions

3
ROBOTC for IFI Version 1.14
  • New ROBOTC version
  • Releasing tomorrow 1/30/08
  • Has built in support for encoders, accelerometer,
    gyro sensor, OI LEDs and more!
  • Make sure to upgrade!

4
Any Questions from Last Week?
5
IR Board Review
  • Rule Clarification from Team Update 3
  • 4 Signals Allows
  • 4 Signals 4 actions
  • Signals must repeat when the same button is
    pressed.
  • The code we developed last meeting meets all of
    these requirements!

6
Encoder Go Straight
  • Last Weeks Notes
  • Use Motors and Sensors Setup to configure our
    encoders
  • Clear the encoders before using them
  • Program Go straight using encoder feedback
  • If left wheel lags behind, slow down right wheel
  • If right wheel lags behind, slow down left wheel
  • If both wheels are equal, go an equal speed.
  • Use Three If statements

7
Accelerometer
  • The Dual-Axis Accelerometer (DAA) measures both
    vibration and gravity.
  • It should be connected to two of the RC analog
    inputs.
  • One to measure X-axis and one to measure Y-axis
    acceleration.

8
Using Accelerometer with ROBOTC
  • Connect to two analog inputs (analog inputs 2 and
    3 on our robot)
  • Set Motors and Sensor Setup to Accelerometer.

9
Using Accelerometer with ROBOTC
  • Access values with
  • SensorValuex_axis
  • SensorValuey_axis
  • Values will range from -200 to 200
  • Scale is 100ths of a G
  • So a value of 153 would be 1.53Gs
  • Sensor will be at rest at or near zero.

10
Accelerometer Demo
11
Operator Interface LEDs
  • 11 LEDs installed on Operator Interface
  • 7 Green
  • 4 Red
  • User Controllable with ROBOTC

12
Controlling the LEDs
  • New ROBOTC function
  • frcOILEDsLED true or false
  • Examples
  • frcOILEDsoiLEDPWM1_Green true
  • Turns on PWM1 Green LED
  • frcOILEDsoiLEDPWM1_Green false
  • Turns off PWM1 Green LED

13
LED Demo
14
Gyro Sensor
  • The Yaw Rate Gyro sensor is used to determine
    rotation.
  • The output labeled T is for Twist or
    rotational velocity.
  • The output labeled R is Relative Temperature.
  • 80 degrees/sec resolution

15
How to use with ROBOTC
  • Connect to one analog input twist only
    (analog input 1 on our robot)
  • Set Motors and Sensor Setup to Accelerometer.

16
How to use with ROBOTC
  • Access using the command
  • SensorValuegyro
  • Sensor will give back results in tenths of a
    degree.
  • A reading of 900 is actually 90.0 degrees
  • The sensor is automatically zeroed at the start
    of your program.

17
Gyro Demo
Write a Comment
User Comments (0)
About PowerShow.com