In this lab you will find a partner, sign out a Pololu 3$\pi$ robot and familiarize yourself with its programming tools.
The slides that Ms Hogan, the lab instructor, delivered in the lab are visible in the frame to the right. If they are difficult to see, however, you can also download the slides.
In the lab, you will receive a 3$\pi$ robot and learn how to use the software tools required to load software onto it.
Before coming to the lab, you must:
Purchase a “Physics-style” lab book from the bookstore, i.e., one that includes axes for graphing:
You will need one lab book between two partners.
Create a LabNet account through the self-serve account generation tool.
Follow the instructions below, noting your actions and observations in your log book.
There will be one robot for each pair of lab partners. You will need to sign this out from the ECE lab technologists (Glenn & Greg, who you should meet in the lab). You must return your robot before the end of the term.
Ensure your 3$\pi$ has fresh batteries installed correctly.
Plug your 3$\pi$ into its programmer:
Plug the programmer into a USB port on your computer.
The very first time that you program a 3$\pi$ robot on your account, you must install some settings that tell Eclipse how to interact with the robot. This is only required the first time you do this: in future labs, you will not need to replicate this step.
Download ENGI1020 Settings.epf (right-click, “Save link as…”):
Find Eclipse in the Applications menu under Development:
Accept the default workspace location:
File menu, select
Browse and find
Import All is checked and click
Once again, this step of importing settings only needs to be done the first time you program a 3$\pi$ robot on your account.
Download lab0.zip (right-click, “Save link as…”):
File menu, select
Existing Projects into Workspace.
Select archive file and
lab0.cpp to open this C++ source file:
Save) to save the changes you’ve made.
That’s all you need to do to modify the C++ source code that your robot’s software will be built from! Of course, the rest of the course will be about learning what changes to make to code…
Open Eclipse’s C++ “perspective”:
Eclipse can be used to work with software in many languages besides C++. When we choose the C++ “perspective”, it makes C++-relevant tools available. For instance, it includes a button to compile our software () and another one to download a compiled program onto a connected robot ().
Compile the program:
Ensure that the Problems tab at the bottom of the screen is empty:
Download your program to the 3$\pi$:
It should start to execute immediately, showing a message on the LCD display.
Try playing with the program… what does it do?
Summarize the lab: what was the final outcome? What did you learn?