Third year seniors will learn to program 2 robots: ActivityBot robots using the programming language named "C" and Moto:bit robots using Blockly and python. Before the February business meeting, members should complete the lessons listed below. If possible, complete at least lessons 1 through 8 before the February meeting.
Lessons utilizing the IDE named Dev-C++
Lesson One - C language - Hello World!
Lesson One includes a link to download Dev-C++ software, which only works with computers running Windows. If you have an Apple computer, then take a look at alternative instructions for completing these lessons
Lesson Two - Variables and Calculations
Lesson Three - Floating Point Math
Lesson Four - Array Variables
Lesson Five - Make a Decision
Lesson Six - Make Several Decisions
Lesson Seven - Make Complicated Decisions
Lesson Eight - Code That Repeats
Lesson Nine - Counting Loops
Lesson Ten - Index Array Variables
Lesson Eleven - Variable Values and Addresses
Lesson Twelve - Get Values From Terminal
Extra Lessons for your reference
Extra Lesson One - Creating Custom Functions
Extra Lesson Two - Driving the ActivityBot
C Language Reference - save this as your "book" on C language
program code for calculations for driving ActivityBot. Open this link to get the complete C code for a program that does calculations for driving ActivityBot.
"C" Lessons to Code a "Rock, Paper, Scissors" game (on YouTube)
Lessons for the Moto:Bit robot
Lesson One – Introduction to Micro:bit programming and MakeCode
Lesson Two – Driving the Moto:bit robot
Lessons for the ActivityBot robot
Most of the lessons below can be completed only when you have an ActivityBot robot. However, you can go ahead and read the first lesson, which is an introduction to microcontrollers, including the one for ActivityBot.
Lesson One - What's a Multicore Microcontroller - Getting Started - you don't need the robot to read this lesson.
Installing the software for ActivityBot - you will need to install the SimpleIDE software on your computer before you can write and test code for the robot. If you have a laptop that you are going to use at GEAR meetings to work with a robot, then you will need to install the software before the meeting in March of 2021 (alternatively, you can ask Mr. Kay for the software at a meeting, he has it on memory sticks). You can go ahead and install the software now, but just skip the part in the instructions where you are asked to connect the robot to the computer to run a test. SimpleIDE is available for Windows and Apple computers and also computers running Linux.
get the software here - on this page you can select your computer type (Windows, Apple, etc.)
update the libraries - after you install SimpleIDE, you will need to update the libraries using instructions on this page
ActivityBot Electronics - read this and save it as a reference about the ActivityBot microcontroller board.
Hello World! - If you did the lessons using Dev-C++, then this is a repeat of the first lesson BUT using the robot to process your code. Everyone will do this lesson because here you will learn how to connect the ActivityBot robot to a computer and transfer programming from the computer to the robot.
Custom Arc Turn Function Here is a custom function that will help with arc turns. I would suggest you skip this one until you have completed the maze lessons.
Calculations for driving straight and turns - download this as a calculations summary to help your coding for the robot
C lanaguage reference for ActivityBot - save this as your "book" on writing code for ActivityBot
ActivityBot Lessons - these are the lessons we will use in our meetings. You can take a look if you like.
ActivityBot Lesson 1
Making the robot move
ActivityBot Challenge 2
Navigate a Rectangular Course (we should be able to publish this lesson soon)
After you have completed the ActivityBot Lessons developed by GEAR advisors, you can explore C programming further by electing to use additional sensors and other equipment in GEAR inventory. Below is a list of equipment that you might want to use for additional exercises.
see IR remote for additional information
Compass Module 3-Axis HMC5883L
SimpleIDE software contains example code for this device. Look in: Learn/Examples/Devices/Sensor/Compass 3-axis HMC 5883L.
LSM9DS1 9-axis IMU Module
This sensor is a combination gyroscope, accelerometer and magnetometer. It also has a temperature sensor.
SimpleIDE software contains example code for this device. Look in: Learn/Simple Libraries/Sensor/liblsm9ds1.
Last update: May 31, 2021