the new ftc platform (connecting your legacy hardware) by team #6389 - the lazybotts 2015-2016...
TRANSCRIPT
The New FTC Platform(Connecting your legacy hardware)
By Team #6389 - The Lazybotts2015-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?
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)
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
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
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
● 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)
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
Putting it all together (Legacy)
USBPOWERDATA
The Whole System
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
Programming the Legacy Module - App Inventor
● FtcDcMotorController
● FtcLegacyModule
● Additional Components
Programming the Legacy Module - App Inventor
● FtcRobotController
● FtcOpMode
● FtcDcMotor
● FtcGamePad
Programming the Legacy Module - App Inventor
Programming the Legacy Module - App Inventor
Chrome v45.0.2454.85 m
Programming the Legacy Module - App Inventor
Programming the Legacy Module - App Inventor
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
Programming the Legacy Module - Android Studio
Wi-Fi Programming and Debugging● Determine Robot Controller IP Address
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)
Programming the Legacy Module - Android Studio
Wi-Fi Programming and Debugging● Enter: adb tcpip 5555● Enter: adb connect <ip-address>:5555
Programming the Legacy Module - Android Studio
Create Hardware Configuration File● After downloading and running Robot Controller App
select the main menu
Programming the Legacy Module - Android Studio
Create Hardware Configuration File● After downloading and running Robot Controller App
select Settings from the main menu
Create Hardware Configuration File● Click New and then Scan to search for connected USB
devices
Programming the Legacy Module - Android Studio
Create Hardware Configuration File● Click on the Legacy Module and assign devices to
connected ports
Programming the Legacy Module - Android Studio
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
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
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.
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.
Programming the Legacy Module - Android Studio
Creating a new Op Mode● Update the Init() and Loop() methods with custom logic.
Programming the Legacy Module - Android Studio
Creating a new Op Mode● Telemetry data can send messages back to Driver
Station
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
Programming the Legacy Module - Android Studio
Connecting Driver Station● Press Start and A or B on the gamepad after starting
Driver Station App
#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”
Questions
?