Hey there, everyone. A week or so ago, I mentioned that our team was considering doing some videos on YouTube explaining how to use EasyC to program robots, both for driving and during the autonomous period. After building a robot this week and adding some sensors to it, we’ve developed a plan for what order to do all of this in. Each main heading is a separate lesson, with additional details as to what is in those lessons. Because the spacing of my list keeps collapsing, I’m using code tags to keep it all straight.
1.Lesson One- Getting Started
a.Physical Connections
i.USB-USB Cable
ii.Wireless Download
b.Installing Firmware
i.IFI Firmware Loader
c.Controller Configuration
i.Labeling Motors
ii.Input/Output
iii.IMEs
d.Comments
i.USE THEM
2.Lesson Two- Defining Variables
a.Global versus Local
b.Types of Variables
3.Lesson Three- User Code
a.Using Semicolons
b.Illustrate the checking method of the compiler
c.Increments and changing variable values
4.Lesson Four- Mapping Joystick Inputs
a.Analog Drive
b.Tank Drive
c.Holonomic Drive
d.Moving motors with joysticks
e.GetJoystickAnalog
f.Setting Analog Deadbands
5.Lesson Five- Joystick Digital
a.Moving a motor
b.Moving a piston
c.Changing Variables
6.Lesson Six- Using a Gyroscope
a.Initializing and using sensors
b.Explain the deadbands
c.Output to LCD Screen
d.Output to Terminal Window
7.Lesson Seven- Using Ultrasonics
a.Initializing and using sensors
b.Output to LCD Screen
c.Output to Terminal Window
8.Lesson Eight- Using Bumpers
a.Initializing and using sensors
b.Output to LCD Screen
c.Output to Terminal Window
9.Lesson Nine- Using IMEs
a.Initializing and using sensors
b.Explain why NOT to use them in EasyC
c.Output to LCD Screen
d.Output to Terminal Window
10.Lesson Ten- Programming Flow
a.While Loop
i.Will repeat while condition is true
ii.All programs go in a while == 1
1.Gets joystick and variable values
iii.Get sensors at the end
b.If Statement
i.Make code more complex
ii.If/Else gives two options based on a conditional
c.Switch
i.Defines which variable tested
ii.Break used to exit the switch
1.Otherwise, will proceed through all cases
iii.Continue will exit the case and move on
iv.Default will run if no case is true
1.Used for error or catch all
d.Timer
i.Wait while something happens
1.Useful for basic stuff
11.Lesson Eleven- LCD Screen Menu
a.Set the backlight
b.Define the necessary variables
c.Explain If/Else Statements
d.Increment Variables
e.Add value to variables
12.Lesson Twelve- Autonomous Control with Individual Motors
a.Defining Variables for easy motor selection
b.Start and Stop motors
c.Time based control
13.Lesson Thirteen- Autonomous Control with Smart Driving
a.Time Control
b.Rotational Control
c.Define Motors
d.Drive
e.Turn Swing versus Turn Center
14.Lesson Fourteen- Wait Until Functions
a.Sensors and Variables
b.IME Speed
15.Lesson Fifteen- Jump Between While == 1 Loops
a.Explain Uses
b.Variable based on face buttons
16.Lesson Sixteen- Holonomic Strafing
a.Conditional Statements
b.Variables based on shoulder buttons
17.Lesson Seventeen- Battery Inputs
a.Main Battery
b.Power Expander
c.Backup Battery
d.Conditionals to say “Change Me”
18.Lesson Eighteen- Selecting a side of the field based on sensor input
a.Ultrasonics
b.Conditional statements
c.Assign variable
19.Lesson Nineteen- Write to internal flash memory
a.Explain why we need it
i.Skip Initialization period between Autonomous and Driver
b.Explain the code process
20.Lesson Twenty- Branching Autonomous Modes
a.Conditional Statements
b.Why to do it
At a later date, we would also be interested in doing videos on the following;
Using Line Followers
Using Color Sensors
Using LED Lights
Using Potentiometers
Using Limit Switches
Using an Accelerometer
However, we would need to order more of the sensors to make these videos.
We’re also interested in making videos illustrating the pseudo-multithreading that is possible in EasyC. I’d also be happy to do a video walkthrough of how to implement the speaker code that jpearman wrote (with his permission).
And as to why I’m posting all of this here, we’re looking for suggestions. If you have any requests for us to do, we’d be happy to add them to the list of projects. This isn’t just something to do over the Summer, we’re really trying to make coding accessible for everyone. So, if you have any comments, concerns or ideas, please feel free to submit them.
Thanks.