跳到主要内容

Learn JavaScript with PU Robot

Introduction: Learn JavaScript with PU Robot


Welcome to a revolutionary way to master coding! Instead of staring at dry syntax and math problems, you are going to learn Static TypeScript (JavaScript) by becoming the lead engineer for PU Robot—your AI-powered humanoid performer.

Our Philosophy: The “Top-down” Approach

Most coding courses start with boring definitions. We do the opposite. We start with action. You will implement a feature, see Robot PU move or speak, and then we will peel back the layers to understand the JavaScript logic underneath.

We move from simple sensory inputs to complex “brain” functions, building your skills brick by brick.

The Learning Path

Here is a glimpse of the journey you will take from a “Code Novice” to a “Robotics Master”, covering following concepts:

图片1

For more advanced students, we focus more on robotics topics. Here is a deeper learning path:

图片2

1. Sensing & Expression (The Basics)

  • Sonar Distance Reading: Teach PU to “see” using ultrasonic waves. Learn about variables and hardware pins.
  • Text-to-Speech: Give PU a voice with the pxt-billy extension. Explore strings and audio synthesis.
  • Speech Content Generation: Build a “Sentence Factory” using arrays and randomizers to make PU’s speech unpredictable and “alive.”

2. Motion & Mechanics (The Body)

  • Servo Control: Master the physics of movement. Learn how to map degrees to electrical pulses.
  • Body Position Control: Create “Poses” by controlling multiple servos simultaneously using Object-Oriented Design.

3. Signal Analysis & Mapping (The Senses)

  • Music Analysis: Teach PU to “hear” the beat and analyze sound frequencies.
  • Sonar Distance Maps: Use mapping logic to create auditory and visual “Radar” systems that change as objects approach.

4. Advanced Stability & Dance (The Humanoid)

  • Balancing with IMU: Use the internal Accelerometer and Gyroscope (IMU) to help PU keep his balance. This is where you learn about real-time sensor loops.
  • Dancing with Balance: Combine rhythm analysis with IMU data to make PU moonwalk, split, and spin without falling over.

5. Intelligence & Navigation (The Brain)

  • Navigation Maps & Path Finding: Use the sonar data to build a digital memory of a room and calculate the shortest path through it.
  • Autopilot: Combine all systems so PU can explore a room autonomously.
  • Emotion Actions: Program “Artificial Personalities” where PU reacts to his environment with joy, fear, or excitement.

Are you ready to give Robot PU his first command?

If you want to learn JavaScript in comprehensive way, checkout following JavaScript Knowledge Graph

图片3

Contents