Running Pybricks on the EV3 (IMPORTANT!)
- Turn OFF the EV3, insert the sdcard into your EV3, THEN power it on (See this link)
- DON’T insert the sdcard into your computer. If you accidentally do so, DO NOT format it.
- Follow the instructions here to load your program into your EV3 (Link). When selecting a location for the project folder, choose your network drive (…the drive with your NRIC number) or a thumbdrive (…if you have one). If neither of these are available, choose the “D:” drive, but note that you’ll need to use back the same computer next time.
- You can replace the default code in “main.py”, with the code from GearsBot.
- Pybricks Intro (ODP / PDF)
- Mission Workflow (ODP / PDF)
- Useful Functions (ODP / PDF)
- Line vs Gyro (ODP / PDF)
- Single Line Follower (ODP / PDF)
- Gyro Follower (ODP / PDF)
- Gyro Turn (Programming) (ODP / PDF)
- Ending the Loop (ODP / PDF)
I’ve only heard about some of the projects, so I may not be able to help much. For those projects that I know of, you can use the resources below. You will need to read and try them out on your own, as I will not be able to guide you through step-by-step. Feel free to ask if you have questions.
- For projects that need to detect an image or posture (eg. driver falling asleep)
- For projects that need to connect a device to a phone app (eg. send notification when garbage bin is empty)
- IoT Slides, Simulator, and Registration
- This webpage covers how to program an IoT micro-controller (ESP8266) using a simulator. It will generate Arduino code that you can load on the actual hardware, but you’ll need to refer to the next set of slides to see how to perform the loading.
- IoT Slides (Actual Hardware)
- This set of slides covers how to transfer the code onto an actual ESP8266 micro-controller. It’s recommended you use your own laptop (NOT PLD) instead of the school’s computer as you’ll need to install some software.
- Hardware: If you need hardware (eg. ESP8266, ultrasonic distance sensors), let me know; I can bring them for you. For sensors that are not covered in the above lessons (eg. ultrasonic distance), you’ll need to do a bit of googling and reading on your own; there are plenty of tutorials online, and I won’t have time to conduct lessons on this for you.