the new ftc platform (connecting your legacy hardware) by team #6389 - the lazybotts 2015-2016...

35
The New FTC Platform (Connecting your legacy hardware) By Team #6389 - The Lazybotts 2015-2016 Season

Upload: tiffany-gregory

Post on 29-Dec-2015

214 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: The New FTC Platform (Connecting your legacy hardware) By Team #6389 - The Lazybotts 2015-2016 Season

The New FTC Platform(Connecting your legacy hardware)

By Team #6389 - The Lazybotts2015-2016 Season

Page 2: The New FTC Platform (Connecting your legacy hardware) By Team #6389 - The Lazybotts 2015-2016 Season

Outline• The new platform - What changes?

• The new Modern Robotics modules

• Connecting legacy hardware

• The whole new system

• Programming the Legacy Module - App Inventor

• Programming the Legacy Module - Android Studio

• #TipsForFtcTeams

• Questions?

Page 3: The New FTC Platform (Connecting your legacy hardware) By Team #6389 - The Lazybotts 2015-2016 Season

The New Platform - What changes?

• No more NXT or “Samantha” Module• Android ZTE - Snapdragon Processor• Uses Wi-fi Direct• All data connections are now USB• No more RobotC or Labview• Java with Android Studio IDE or MIT

App Inventor• Competitions will be different

• No software inspections• No FCS• No provided joysticks• Sport Start (3...2...1...GO)

Page 4: The New FTC Platform (Connecting your legacy hardware) By Team #6389 - The Lazybotts 2015-2016 Season

The New Platform - Power Dist. Module (PDM)

● A power terminal block allowing for easier power distribution

● The main hub for control communication via USB connectors

● All Anderson power connections

● We recommend changing power plug to an Anderson Powerpole connector

Connects to Android ZTE phone through a mini USB port

6 power outputs for Motor and Servo Controllers

Connects to the 12 volt battery

7 USB ports for Motor & Servo Controllers

Page 5: The New FTC Platform (Connecting your legacy hardware) By Team #6389 - The Lazybotts 2015-2016 Season

The New Platform - Motor Controller Module (MCM)

● Anderson power connectors

● No longer capable of “daisy chaining” controllers

● More durable mounting bracket.

● Two motor encoderconnectors

Connect two DC motors

Connects to the core power module through a mini USB port

Power connection from PDM

Page 6: The New FTC Platform (Connecting your legacy hardware) By Team #6389 - The Lazybotts 2015-2016 Season

The New Platform - Servo Controller Module (SCM)

● Anderson power connectors

● No longer capable of “daisy chaining” controllers

● More durable mounting bracket.

Connect up to six servo motors

Connects to the core power module through a mini USB port

Power connection from PDM

Page 7: The New FTC Platform (Connecting your legacy hardware) By Team #6389 - The Lazybotts 2015-2016 Season

● AKA “Advanced Sensor Module”

● Allows you to use standard, off the shelf sensors

● No more need to use the “proto board” to attach limit switches and 3rd party sensors

● Powered by USB connection

● 8 digital I/O ports● 2 PWM output ports● 6 High speed I2C ports● 8 analog input, 2 analog output ports

Connects to the Core Power Module via USB cable

The New Platform - Device Interface Module (DIM)

Page 8: The New FTC Platform (Connecting your legacy hardware) By Team #6389 - The Lazybotts 2015-2016 Season

The New Platform - Core Legacy Module (CLM)

Connects to the core power module through a mini USB port

i2c ports connect to the legacy motor and servo controllers i2c ports

● Used only to connect LEGO®

NXT sensors, legacy Hitechnic Motor and Servo controllers, Lego Motors, and Protoboard.

● Powered by USB connection

Page 9: The New FTC Platform (Connecting your legacy hardware) By Team #6389 - The Lazybotts 2015-2016 Season

Putting it all together (Legacy)

USBPOWERDATA

Page 10: The New FTC Platform (Connecting your legacy hardware) By Team #6389 - The Lazybotts 2015-2016 Season

The Whole System

Page 11: The New FTC Platform (Connecting your legacy hardware) By Team #6389 - The Lazybotts 2015-2016 Season

Programming the Legacy Module - App Inventor

● App Inventor - http://ftc.edu.intelitek.com/● Get help at http://groups.google.com/forum/#!forum/mitappinventortest ● A Browser Based Programming tool● A Component and Block Based Programming tool

Page 12: The New FTC Platform (Connecting your legacy hardware) By Team #6389 - The Lazybotts 2015-2016 Season

Programming the Legacy Module - App Inventor

● FtcDcMotorController

● FtcLegacyModule

● Additional Components

Page 13: The New FTC Platform (Connecting your legacy hardware) By Team #6389 - The Lazybotts 2015-2016 Season

Programming the Legacy Module - App Inventor

● FtcRobotController

● FtcOpMode

● FtcDcMotor

● FtcGamePad

Page 14: The New FTC Platform (Connecting your legacy hardware) By Team #6389 - The Lazybotts 2015-2016 Season

Programming the Legacy Module - App Inventor

Page 15: The New FTC Platform (Connecting your legacy hardware) By Team #6389 - The Lazybotts 2015-2016 Season

Programming the Legacy Module - App Inventor

Chrome v45.0.2454.85 m

Page 16: The New FTC Platform (Connecting your legacy hardware) By Team #6389 - The Lazybotts 2015-2016 Season

Programming the Legacy Module - App Inventor

Page 17: The New FTC Platform (Connecting your legacy hardware) By Team #6389 - The Lazybotts 2015-2016 Season

Programming the Legacy Module - App Inventor

Page 18: The New FTC Platform (Connecting your legacy hardware) By Team #6389 - The Lazybotts 2015-2016 Season

Programming the Legacy Module - Android Studio

Initial Setup● Setup Phones● Install Android Studio● Download ftc_app-master from GitHub● Install Driver Station from Google Play Store● Connect phone to Android Studio● Compile and Download Robot Controller App to phone● Name and Pair phones using WiFi Direct● Connect Robot Controller phone to a Wireless Network

accessible from computer

Page 19: The New FTC Platform (Connecting your legacy hardware) By Team #6389 - The Lazybotts 2015-2016 Season

Programming the Legacy Module - Android Studio

Wi-Fi Programming and Debugging● Determine Robot Controller IP Address

Page 20: The New FTC Platform (Connecting your legacy hardware) By Team #6389 - The Lazybotts 2015-2016 Season

Programming the Legacy Module - Android Studio

Wi-Fi Programming and Debugging● Connect RobotController phone to PC with a USB cable● Click on the Terminal tab (Bottom row of buttons in

Android Studio)

Page 21: The New FTC Platform (Connecting your legacy hardware) By Team #6389 - The Lazybotts 2015-2016 Season

Programming the Legacy Module - Android Studio

Wi-Fi Programming and Debugging● Enter: adb tcpip 5555● Enter: adb connect <ip-address>:5555

Page 22: The New FTC Platform (Connecting your legacy hardware) By Team #6389 - The Lazybotts 2015-2016 Season

Programming the Legacy Module - Android Studio

Create Hardware Configuration File● After downloading and running Robot Controller App

select the main menu

Page 23: The New FTC Platform (Connecting your legacy hardware) By Team #6389 - The Lazybotts 2015-2016 Season

Programming the Legacy Module - Android Studio

Create Hardware Configuration File● After downloading and running Robot Controller App

select Settings from the main menu

Page 24: The New FTC Platform (Connecting your legacy hardware) By Team #6389 - The Lazybotts 2015-2016 Season

Create Hardware Configuration File● Click New and then Scan to search for connected USB

devices

Programming the Legacy Module - Android Studio

Page 25: The New FTC Platform (Connecting your legacy hardware) By Team #6389 - The Lazybotts 2015-2016 Season

Create Hardware Configuration File● Click on the Legacy Module and assign devices to

connected ports

Programming the Legacy Module - Android Studio

Page 26: The New FTC Platform (Connecting your legacy hardware) By Team #6389 - The Lazybotts 2015-2016 Season

Create Hardware Configuration File● Click attached and name each connected motor.(These names will be used in our OpMode program)

Programming the Legacy Module - Android Studio

Page 27: The New FTC Platform (Connecting your legacy hardware) By Team #6389 - The Lazybotts 2015-2016 Season

Create Hardware Configuration File● Several hardware configurations can be stored on the

Robot Controller allowing one phone to be moved between robots.

Programming the Legacy Module - Android Studio

Page 28: The New FTC Platform (Connecting your legacy hardware) By Team #6389 - The Lazybotts 2015-2016 Season

Programming the Legacy Module - Android Studio

Creating a new Op Mode● OpModes are the name for

user programs that can be started and stopped from the Driver Station App (both TeleOp and Autonomous)

● The Robot Controller App project folder can seem intimidating but there are really only a few files we need to update.

Page 29: The New FTC Platform (Connecting your legacy hardware) By Team #6389 - The Lazybotts 2015-2016 Season

Programming the Legacy Module - Android Studio

Creating a new Op Mode● The easiest way to start is to

copy and paste an existing OpMode

● Android Studio will prompt for a new class name

● In Java class names will be the same as the file they are in.

Page 30: The New FTC Platform (Connecting your legacy hardware) By Team #6389 - The Lazybotts 2015-2016 Season

Programming the Legacy Module - Android Studio

Creating a new Op Mode● Update the Init() and Loop() methods with custom logic.

Page 31: The New FTC Platform (Connecting your legacy hardware) By Team #6389 - The Lazybotts 2015-2016 Season

Programming the Legacy Module - Android Studio

Creating a new Op Mode● Telemetry data can send messages back to Driver

Station

Page 32: The New FTC Platform (Connecting your legacy hardware) By Team #6389 - The Lazybotts 2015-2016 Season

Programming the Legacy Module - Android Studio

Creating a new Op Mode● Add the new OpMode class to the list of registered

OpModes to make it show up on the Driver Station App

Page 33: The New FTC Platform (Connecting your legacy hardware) By Team #6389 - The Lazybotts 2015-2016 Season

Programming the Legacy Module - Android Studio

Connecting Driver Station● Press Start and A or B on the gamepad after starting

Driver Station App

Page 34: The New FTC Platform (Connecting your legacy hardware) By Team #6389 - The Lazybotts 2015-2016 Season

#TipsForFtcTeams

● USB Plugs can wear out quickly, and may be generally sketchy to begin with.

● Design and 3D print a harness for each module

● Static discharge may still be an issue

● Avoid multiple USB connection joints

● Amazon.com. Search for “Hittime 3 in 1 USB OTG Cable Adapter”

Page 35: The New FTC Platform (Connecting your legacy hardware) By Team #6389 - The Lazybotts 2015-2016 Season

Questions

?