​
Three Levels of Computer Programming
With the Petoi ‘Bittle X’ Robot Dog
Workshop Overview
Programming in three different paradigms
​
What You’ll Learn Today
•How to write code across three levels of interaction between hardware and software, from low-level commands to high-level AI-driven programming.
1.Serial Protocol (low-level commands)
2.High-Level Programming Languages (modern, human-readable code)
3.Prompt Engineering (AI-driven control)
•Understand how computers interpret commands
•Have fun with hands-on activities using a robot dog!
Petoi ‘Bittle X’ Robot Dog
BiBoard – ESP32 Microcontroller
Level 1 – Serial Protocol
The lowest (kind of, not really, but kind of) level of programming.
Level 1 – Serial Protocol
The foundation of computer programming
​
Driving Manual Instead of Automatic
•Minimal Abstraction: Send direct, simple commands that communicate directly with the hardware.
•Low-Level Programming: Close to binary-level control, giving you full command over the machine's behavior.
•Foundational to All Computing: This is how early computers were programmed, laying the groundwork for modern programming languages.
•Precision and Math Required: Working at this level demands a solid understanding of technical documentation and mathematical accuracy.
While we get your robots connected, here’s something fun to do:
​
1.Name Your Robot: Think of a unique name for your own robot dog!
2.Guess the Famous Robot Dog: Watch the clips of the Boston Dynamics robot dog performing amazing moves. Can you guess its name? (Hint: It’s one of the most well-known robots in the world!)
3.Research Challenge: What type of sensors do robots use to maintain balance and orientation? Find out how these sensors work and why they’re crucial for a robot to stay upright and move smoothly. Hint: These sensors are commonly found in devices like smartphones and are essential for detecting movement and rotation.
Feel free to use Microsoft Copilot or ChatGPT as a research assistant!
Let’s Get Connected!
​
Activity
Using Visual Studio Code and the Serial Protocol document, send commands to make the dog do the following things.
1.Make the dog sit down. Hint, type “ksit” and then enter.
2.Make the dog stand up.
3.Make the dog hug.
4.Make the dog hi-five.
5.Make the dog dig.
6.Make the dog kick.
7.Make the dog do push ups.
8.Make the dog do push ups with 1 hand.
9.Make the dog cheer.
10.Make the dog jump.
11.Make the dog moon walk.
12.Make the dog box.
13.Make the dog handstand.
14.Make the dog rest.
Level 1 – Serial Protocol
Key Takeaways
​
Things to Remember
•Hands-On Control: Serial Protocol gives you direct, manual control over the robot's movements, with no middle layers.
•Technical Precision: This low-level programming requires careful attention to detail and accuracy in every command.
•Real-World Applications: Industries like NASA, SpaceX, and hardware development still use similar low-level programming for precision tasks.
•Foundation for Modern Programming: Understanding how computers process these commands is essential for mastering higher-level programming languages.
Level 2 – High Level Programming Languages
This is where we’re mostly hanging out today in the world of computer programming.
Level 2 – High Level Programming Languages
The Current Standard of Software Development
​
Driving Automatic Instead of Manual
•Abstracted Programming: Use human-readable code that abstracts away low-level complexities, making programming more accessible.
•Higher-Level Control: Enables more powerful and flexible control through structures like loops, functions, and conditionals.
•Widely Used Today: Languages like Python, JavaScript, and C# are the backbone of software development across industries.
•Simplifies Complex Tasks: High-level languages allow developers to focus on problem-solving and functionality, leaving the technical details of hardware interaction to compilers and interpreters.
​
Activity
Using Python in Visual Studio Code, write a program that makes the robot dog do the following:
1.Make the dog sit down then wait 1 second. This is done for you! The line of code is sendSkillStr('ksit’, 1).
2.Make the dog stand up then wait 1 second.
3.Make the dog hug then wait 1 second.
4.Make the dog hi-five then wait 1 second.
5.Make the dog dig then wait 1 second.
6.Make the dog kick then wait 1 second.
7.Make the dog do push ups then wait 3 seconds.
8.Make the dog do push ups with 1 hand then wait 3 seconds.
9.Make the dog cheer then wait 1 second.
10.Make the dog jump then wait 3 seconds.
11.Make the dog moon walk then wait 1 second.
12.Make the dog box then wait 1 second.
13.Make the dog handstand then wait 3 seconds.
14.Make the dog rest then wait 1 second.
Level 2 – High Level Programming Languages
Key Takeaways
​
Things to Remember
•Human-Readable Code: High-level languages like Python make coding easier to understand by abstracting away the technical details of hardware.
•Complex Logic: These languages allow you to use powerful structures such as loops, conditionals, and functions to solve more intricate problems.
•Real-World Applications: High-level programming is used in everyday development at companies like Microsoft, Google, and Apple to build apps, websites, and software.
•Bridge Between Code and Hardware: Although easier to work with, high-level languages still rely on translation into machine code for the computer to execute.
Level 3 – AI Prompt Engineering
Write in natural language (prompts) and let AI figure out what you mean to generate code.
Level 3 – AI Prompt Engineering
The Future of Computer Programming
​
Driving With a Robot Copilot
•Natural Language Control: Use everyday language to communicate with AI and direct the robot dog’s actions.
•Abstracted to the Max: With AI, you don’t need to fully understand the code (ALTHOUGH YOU REALLY SHOULD), only how to explain what you want clearly.
•Empowered by AI: AI acts as an intelligent assistant, interpreting your commands and translating them into machine actions. Like Tony Stark and Jarvis in Iron Man.
•Transforming Programming: Prompt engineering is revolutionizing the way we interact with machines, making technology more accessible for everyone.
​
Activity
Using Visual Studio Code as your prompting interface, write natural language prompts to control the dog in the following ways.
1.Make the dog sit down.
2.Make the dog stand up.
3.Make the dog hug.
4.Make the dog hi-five.
5.Make the dog dig.
6.Make the dog kick.
7.Make the dog do push ups.
8.Make the dog do push ups with 1 hand.
9.Make the dog cheer.
10.Make the dog jump.
11.Make the dog moon walk.
12.Make the dog box.
13.Make the dog handstand.
14.Make the dog rest.
15.Bonus – Make the dog do a back flip and/or front flip.
​
Be creative! Try various prompts to see how AI interprets them and adjusts its actions accordingly.
Level 3 – AI Prompt Engineering
Key Takeaways
​
Things to Remember
•Natural Language Commands: AI allows us to control machines using human language, making programming more intuitive and accessible.
•AI as an Assistant: AI interprets commands based on how we’ve programmed it, but it still requires human intelligence to work effectively.
•Human Control: While AI makes programming easier, the logic and problem-solving skills still come from human understanding.
•The Future of Programming: As AI evolves, prompt engineering will become a valuable skill, but a deep understanding of traditional programming remains essential.
Any Questions?
The floor is yours!
Thank You!