1 / 18

What you asked me to teach…

What you asked me to teach…. What you asked me to teach…. Getting Started. Sec 9-2 Web Design. Objectives. The student will: Know to establish a bluetooth link to the Scribbler robot. Know to start IDLE (the Python GUI) Know how to initialize the robot and issue basic commands.

arlo
Download Presentation

What you asked me to teach…

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. What you asked me to teach…

  2. What you asked me to teach…

  3. Getting Started Sec 9-2 Web Design

  4. Objectives The student will: • Know to establish a bluetooth link to the Scribbler robot. • Know to start IDLE (the Python GUI) • Know how to initialize the robot and issue basic commands

  5. Bluetooth • You have been provided with an Aziobluetooth dongle • It is your responsibly to make sure that the adaptor is put away with the robot at the end of class. I do not have any spare adaptors. If you lose yours you will be at the mercy of the other teams to share theirs.

  6. Connecting to the robot • Insert the adaptor into the PC • Turn on your robot • On the front of the Fluke card note the number under the bar code. • In the task bar click on Bluetooth manager: • Click on: • Select “Express mode” and click Next • Find your Fluke and click Next

  7. Connecting to the robot • The Adaptor should connect to the robot. • Note the com port assigned to the connection You are now connected to your robot.

  8. IDLE Python GUI A graphical user interface (GUI) is a human-computer interface (i.e., a way for humans to interact with computers) that uses windows, icons and menus and which can be manipulated by a mouse (and often to a limited extent by a keyboard as well). IDLE is a GUI but uses the keyboard for input.

  9. Getting ready for Python • In your My Documents folder… • Create a folder called “My Python” • From the Hancock website on the Web Design page download the “start python.zip” file. • Right mouse button on the zip file and Open with Windows Explorer. Extract the file to your My Python folder (Extract all files at the top of the explorer page).

  10. IDLE • Double click on start python in the My Python folder.

  11. Python • From python.org “Python is a remarkably powerful dynamic programming language that is used in a wide variety of application domains.” • Python is a programming language • It has a specific syntax • Punctuation, indentation, etc. • It has rules • Upper and lower case letters are different

  12. Python • Alice had a language, but you didn’t need to type it… Method/ Function Parameter Comment Statement/Command

  13. Python • You type the code • Many of the constructs are very similar Method/ Function Parameter Comment Statement/Command

  14. Software Libraries • Software libraries are predetermined functions that are provided to the programmer. • For scribbler will be my using the myrolibrary. (Myro is short for “my robot”) • Most programming languages have a way of including a library. In Python you type: from myro import * • The * means “import everything from the library”

  15. Establishing a software link to the robot • Now that you have the “myro” functions available, you can establish a software link to your robot. • Python functions are called by typing: function(parameters) • The function to link to the robot is: initialize(“comX”) • comX is the com port that was listed when the Bluetooth connected to the robot. If you don’t remember the com port, go back to the Bluetooth Manager and click on details.

  16. Establishing a software link to the robot • If correct your robot should play a tune and report back it’s name.

  17. Test your robot • Now that you have a link to your robot you can test the link. • Put you robot on the floor (if you break your robot, it will be hard to finish the class) • Type joyStick() • Note that joystick() is not the same as joyStick() • Capital letters matter! • Drive your robot around. Note that the front of your robot is the part where the Fluke card is!

  18. Rest of today… • Form your group – 3 people to a group • Pick a robot. This will be you team’s robot for the remainder of the year. • Test your robot. • Also try issuing the commands: beep(1, 880) move(1, 1) • Read Chapter 1 in the book. • You must read!! • Do not change the name of your robot!

More Related