Successfully reported this slideshow.
Your SlideShare is downloading. ×

FTC Robot C to Java

Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad

Check these out next

1 of 23 Ad
Advertisement

More Related Content

Slideshows for you (20)

Similar to FTC Robot C to Java (20)

Advertisement

More from Jeanne Boyarsky (20)

Recently uploaded (20)

Advertisement

FTC Robot C to Java

  1. 1. FTC: Moving from Robot-C to Java 5/2/15 Jeanne Boyarsky Programming Mentor FRC Team 694 slideshare.net/boyarsky Twitter @jeanneboyarsky Blog: http://www.selikoff.net Moderator on Java forums at: http://www.coderanch.com
  2. 2. Pause for Commercial My first book:
  3. 3. Choices for Coding Step Tool Type of programming Comments Crawl Point to Point (download two existing apps) Configuration Rookie teams? Prototyping? Walk MIT App Inventor Blocks Like Scratch Run Android Studio Text (most like Robot-C) Real programmers use http://appinventor.mit.edu/explore https://developer.android.com/sdk/index.html
  4. 4. Java – the lay of the land Non-Android Java program stops here
  5. 5. Major parts JDK (Java Development Kit) IDE (integrated development environment) Editor Emulator javac JRE (java runtime environment) APIs (libraries) Git (version control) java Gradle (build) Note: Github.com offers free hosting
  6. 6. Installing Android Studio Pre-reqs: Java JDK 8 (or 7 if already have it) Lots of RAM (2-4 GB) Any Operating System  http://www.oracle.com/technetwork/java/javase/downloads/i ndex.html https://developer.android.com/sdk/index.html The official IDE for Android!
  7. 7. Setup Pre-reqs: Time Internet Admin rights Wizard guides you through setup/downloads runtime
  8. 8. Create Android project (even to play with Java)
  9. 9. Create Java library
  10. 10. Finish up
  11. 11. First class
  12. 12. Run it Run > Run FTC
  13. 13. C/C++ vs Java - differences For C/C++ Java Constants Header file Interfaces or static/final fields Referencing other code #include import Primitives bool, int, short, etc boolean, short, int, long, float, double Strings char[] or string String These are not logical equivalents. Just in similar spaces.
  14. 14. Same in Java Lots Arrays If statements Math Calling a method (mostly) Comments
  15. 15. Big differences in Java Garbage collection! no malloc/free – unless calling C/C++ No pre-processor directives No pointers No operator overloading Platform independent
  16. 16. Android Studio - Views Default – Android view Project view – shows file system
  17. 17. Android Studio – Autocomplete Control + space
  18. 18. Reading: Parts of a class Imports Superclass Interface
  19. 19. Reading: C-like enough, right? Instance variable
  20. 20. Package (like a folder for grouping) Top level Class Nested class Comment Constant Reading: Complex Android Class
  21. 21. Java Version Q&A Why doesn't Java know how to count? The versions go 1.1, 1.2, 1.3, 1.4, 5, 6, 7, 8 Blame marketing! What books are good for learning Java? Head First Java Thinking in Java (older versions free) Java for Dummies Deitel & Deitel Core Java
  22. 22. Questions About Java: – Friendly forums for those new (or not new) to Java: http://www.coderanch.com For FTC specific questions: – http://www.chiefdelphi.com – http://ftcforum.usfirst.org/forum.php – https://www.reddit.com/r/FTC/ – Where else?
  23. 23. References Android Studio: https://developer.android.com/sdk/index.htm FTC Schematic: http://modernroboticsinc.com/Content/Images/ uploaded/Schematicx1000.jpg FTC Kit: http://modernroboticsinc.com/first-ftc FTC Controller: http://first.intelitek.com

×