### Please enable JavaScript to use CodeHS

Intro to Programming in JavaScript with Arduino

#### Points

Activity Points
Programming With Karel
1.1 Introduction to Programming With Karel
1.1.1 Introduction to Programming With Karel 1
1.1.2 Quiz: Karel Commands 5
1.1.3 Our First Karel Program 1
1.1.4 Your First Karel Program 5
1.1.5 Short Stack 5
1.2 More Basic Karel
1.2.1 More Basic Karel 1
1.2.2 More Basic Karel Quiz 5
1.2.3 Tennis Ball Square 1
1.2.4 Make a Tower 5
1.2.5 Pyramid of Karel 5
1.3 Karel Can't Turn Right
1.3.1 Karel Can't Turn Right 1
1.3.2 Karel Can't Turn Right Quiz 5
1.3.3 Tower and Turn Right 1
1.3.4 Slide Karel 5
1.3.5 Fireman Karel 5
1.3.6 Karel Turns Right Badge 1
1.4 Functions in Karel
1.4.1 Functions in Karel 1
1.4.2 Functions in Karel Quiz 5
1.4.3 Turn Around 1
1.4.4 Pancakes 5
1.4.5 Mario Karel 5
1.5 The Start Function
1.5.1 The Start Function 1
1.5.2 The Start Function Quiz 5
1.5.3 Tower with Start Function 1
1.5.4 Pancakes with Start 5
1.6 Top Down Design and Decomposition in Karel
1.6.1 Top Down Design and Decomposition in Karel 1
1.6.2 Top Down Design and Decomposition Quiz 5
1.6.3 Hurdle Karel 1
1.6.4 The Two Towers 5
1.7.2 Commenting Your Code Quiz 5
1.7.3 Hurdle Karel 1
1.7.4 The Two Towers + Comments 5
1.8 Super Karel
1.8.1 Super Karel 1
1.8.2 Super Karel Quiz 5
1.8.3 Hurdle Karel (with SuperKarel) 1
1.8.4 The Two Towers + SuperKarel 5
1.9 For Loops
1.9.1 For Loops 1
1.9.2 For Loops Quiz 5
1.9.3 Repeated Move 1
1.9.4 Put Down Tennis Balls 1
1.9.5 Take 'em All 5
1.9.6 Dizzy Karel 5
1.9.7 Ball in Each Corner 5
1.9.8 Lots of Hurdles 5
1.10 If Statements
1.10.1 If Statements 1
1.10.2 If Statements Quiz 5
1.10.3 If Statements 1
1.10.4 Safe Take Ball 1
1.10.5 Is There a Ball? 5
1.10.6 Don't Crash! 5
1.11 If/Else Statements
1.11.1 If/Else Statements 1
1.11.2 If/Else Statements Quiz 5
1.11.3 If/Else Statements 1
1.11.4 Opposite Day 1
1.11.5 Right Side Up 5
1.11.6 Right vs. Left Square 5
1.12 While Loops in Karel
1.12.1 While Loops in Karel 1
1.12.2 While Loops in Karel Quiz 5
1.12.3 Move to Wall 1
1.12.5 Lay Row of Tennis Balls 5
1.12.6 Big Tower 5
1.13 Control Structures Example
1.13.1 Control Structures Example 1
1.13.2 Control Structures Example Quiz 5
1.13.3 Cleanup Karel 1
1.13.4 Random Hurdles 5
1.13.5 Mindset Survey 1 1
1.14 More Karel Examples and Testing
1.14.1 More Karel Examples and Testing 1
1.14.2 Quiz: Which Control Structure? 5
1.14.3 Move Tennis Ball Stack 1
1.14.4 Climbing Karel 1
1.15 How to Indent Your Code
1.15.1 How to Indent Your Code 1
1.15.2 How to Indent Your Code Quiz 5
1.15.3 Dance and Clean Karel 1
1.15.4 Diagonal 5
1.15.5 Staircase 5
1.16 Programming with Karel Quiz
1.16.1 Programming with Karel Quiz 5
Karel Challenges
2.1 Challenge Problems
2.1.1 Fetch 10
2.1.2 Racing Karel 10
2.1.3 Tower Builder 10
2.1.4 Super Cleanup Karel 10
2.1.5 Double Tennis Balls 10
JavaScript and Graphics
3.1 Hello World
3.1.1 Hello World 1
3.1.2 Hello World Quiz 5
3.1.3 Hello World 1
3.1.4 Your Name and Hobby 5
3.2 Variables
3.2.1 Variables 1
3.2.2 Variables Quiz 5
3.2.3 Basic Variables 1
3.2.4 Daily Activities 5
3.3 User Input
3.3.1 User Input 1
3.3.2 User Input Quiz 5
3.3.3 Basic User Input 1
3.3.4 Dinner Plans 5
3.4 Basic Math in JavaScript
3.4.1 Basic Math in JavaScript 1
3.4.2 Basic Math in JavaScript Quiz 5
3.4.3 Simple Calculator 1
3.4.4 Dollars to Pounds 1
3.4.5 Dividing Up Groups 1
3.4.6 T-Shirt Shop 5
3.4.7 Running Speed 5
3.5 Using Graphics in JavaScript
3.5.1 Graphics 1
3.5.2 JavaScript Graphics Quiz 5
3.5.3 Graphics Hello World 1
3.5.4 Blue Circle 1
3.5.5 Red Rectangle 1
3.5.6 8 Ball 1
3.5.7 Flag of the Netherlands 5
3.5.8 Snowman 5
3.6 Programming with JavaScript Quiz
3.6.1 JavaScript and Graphics Quiz 25
Graphics Challenges
4.1 Collaborative Programming
4.1.1 Pair-Programming 1
4.1.2 Pair-Programming 5
4.1.3 Why Practice Pair-Programming? 1
4.1.4 Pair-Programming Reflection 5
4.2 Graphics Challenges
4.2.1 Ghost 10
4.2.2 Fried Egg 10
4.2.3 Draw Something 10
Intro to Arduino
5.1 Welcome to Arduino!
5.1.1 Intro to Arduino 5
5.1.2 Explore an Arduino Project 5
5.1.3 Arduino Memory Game 5
5.1.7 Exploration 1.1 Follow-up 5
5.1.8 Background & Experience 5
5.1.9 Goal Setting 5
5.2.1 Setting Up your Arduino 5
5.2.2 Exploration: Intro to Programming with Arduino 5
5.2.3 Exploration 1.2 Follow-up 5
5.2.5 Long and Short LED Blink 5
5.2.6 Morse Code 5
5.3.5 Exploration: Analog vs. Digital 5
5.3.6 Exploration 1.3 Follow-up 5
5.3.7 LED at Many Brightness Values 5
5.4 Variables
5.4.1 Variables 5
5.4.2 Variables 5
5.4.3 Variable Brightness 5
5.4.4 Dim an LED 5
5.4.7 Variable Brightness with Breadboard 5
5.4.8 Exploration: Arduino Structure using Variables 5
5.4.9 Exploration 1.4 Follow-up 5
5.4.10 One Bright, One Fading 5
5.4.11 Pulsing LED 5
5.5 Debugging
5.5.1 Debugging 5
5.5.2 Exploration: Using the Serial Monitor 5
5.5.3 Exploration 1.5 Follow-up 5
5.5.4 Physical Debugging: LED 5
5.5.5 Physical Debugging: LED and Potentiometer 5
5.5.6 Debugging with Tools: LED 5
5.6 Intro to Arduino Quiz
5.6.1 Intro to Arduino Quiz 5
JavaScript Control Structures
6.1 Booleans
6.1.1 Booleans 1
6.1.2 Booleans Quiz 5
6.1.3 First Boolean 1
6.1.4 Do You Have a Dog? 5
6.2 Logical Operators
6.2.1 Logical Operators 1
6.2.2 Logical Operators Quiz 5
6.2.3 Light Switch 1
6.2.4 President 1
6.2.5 Wasting Time 1
6.2.7 School's Out 5
6.3 Comparison Operators
6.3.1 Comparison Operators 1
6.3.2 Comparison Operators Quiz 5
6.3.3 Voting Age 1
6.3.5 Rolling Dice 5
6.3.6 Girl Scout Designation 5
6.4 If Statements
6.4.1 If Statements 1
6.4.2 If Statements Quiz 5
6.4.3 Negative Numbers 1
6.4.4 Great Names 1
6.4.5 Even and Odd 1
6.4.7 Teenagers 5
6.4.8 Dietary Restrictions 5
6.4.10 Mindset Survey 2 1
6.5 For Loops in JavaScript
6.5.1 Basic For Loop 1
6.5.2 For Loops Quiz 5
6.5.3 For Loop 1
6.5.4 Chalkboard 5
6.5.5 The Worm 5
6.5.6 Caterpillar 5
6.6 General For Loops
6.6.1 General For Loop 1
6.6.2 General For Loop Quiz 5
6.6.3 Countdown 1
6.6.4 Count By Twos 1
6.6.5 Count By Sevens 5
6.6.6 Powers of Two 5
6.7 For Loop Practice
6.7.1 For Loop Examples 1
6.7.2 For Loop Examples Quiz 5
6.7.3 For Loop Sum 1
6.7.4 Better Sum 5
6.7.5 Factorial 5
6.7.6 All Dice Values 5
6.8 Random Numbers
6.8.1 Random Numbers 1
6.8.2 Random Numbers Quiz 5
6.8.3 Rolling a Die 1
6.8.4 Flipping a Coin 1
6.8.5 Lots of Rolls 5
6.8.6 Random Color Square 5
6.9 While Loops
6.9.1 While Loops 1
6.9.2 While Loops Quiz 5
6.9.3 While Loop Countdown 1
6.9.4 Inventory 5
6.9.5 Fibonacci 5
6.9.6 Concentric Circles 5
6.10 Loop and a Half
6.10.1 Loop and a Half 1
6.10.2 Loop and a Half Quiz 5
6.10.4 Snake Eyes 5
6.11 Javascript Control Structures Quiz
6.11.1 JavaScript Control Structures Quiz 25
Control Structures Challenges
7.1 Control Structures Challenges
7.1.1 Guessing Game 10
7.1.2 Circles in Circles 10
7.1.3 Circles in Squares 10
7.1.4 Happy Birthday! 10
Functions and Parameters
8.1 Functions and Parameters 1
8.1.1 Functions and Parameters 1 1
8.1.2 Functions and Parameters Quiz 1 5
8.1.3 Double Number 1
8.1.4 Square 5
8.1.5 Triple 5
8.2 Functions and Parameters 2
8.2.1 Functions and Parameters 2 1
8.2.2 Functions and Parameters Quiz 2 5
8.2.3 Sum Function 1
8.2.4 Area of Triangle 5
8.2.5 Height in Meters 5
8.3 Functions and Parameters 3
8.3.1 Functions and Parameters 3 1
8.3.2 Functions and Parameters Quiz 3 5
8.3.3 Draw Circles 1
8.3.4 Vertical Lines 5
8.3.5 Graphics Stop Light 5
8.3.6 Pool Table 5
8.3.7 Cityscape 5
8.3.9 Mindset Survey 3 1
8.4 Functions and Return Values 1
8.4.1 Functions and Return Values 1 1
8.4.2 Functions and Return Values Quiz 5
8.4.3 Double Number 1
8.4.4 Square with Return Values 5
8.4.5 Triple with Return Values 5
8.4.6 Gymnastics Mats 5
8.5 Functions and Return Values 2
8.5.1 Functions and Return Values 2 1
8.5.2 Functions and Return Values Quiz 2 5
8.5.3 Return Values 1
8.5.4 Is It Even? 5
8.5.5 Max 5
8.6 Local Variables and Scope
8.6.1 Local Variables and Scope 1
8.6.2 Local Variables and Scope Quiz 5
8.6.3 Return Values 1
8.6.4 Local Variables 5
8.7 Functions and Parameters Quiz
8.7.1 Functions and Parameters Quiz 5
Functions Challenges
9.1 Functions Challenges
9.1.1 Hailstone Sequence 10
9.1.2 Balloons 10
9.1.4 Ghost Invasion! 10
Program Control with Arduino
10.1 Loops
10.1.1 Loops 5
10.1.2 Loops 5
10.1.3 Pulsing LED with Loops 5
10.1.4 Light LED Based on Potentiometer 5
10.1.6 Alternating LED until Button Press 5
10.1.7 Exploration: Using Servo Motors 5
10.1.8 Exploration 2.1 Follow-up 5
10.1.9 Sweeping Servo 5
10.1.10 Blinking Based on Potentiometer 5
10.2 If/Else Statements
10.2.1 If/Else Statements 5
10.2.2 If/Else Statements 5
10.2.3 LED Brightness with Potentiometer 5
10.2.4 Stoplight LEDs 5
10.2.5 LED Brightness using Buttons 5
10.2.6 Exploration: Using Buttons to Control Code 5
10.2.7 Exploration 2.2 Follow-up 5
10.2.8 Servo Position by Button Press 5
10.2.9 Servo Sweep with Reset 5
10.3 Arithmetic, Comparison, and Logical Operators
10.3.1 Arithmetic, Comparison, and Logical Operators 5
10.3.2 Arithmetic, Comparison, and Logical Operators 5
10.3.3 Potentiometer with AND 5
10.3.4 Potentiometer with OR 5
10.3.5 Potentiometer Controlling LED 5
10.3.6 Exploration: Ultrasonic Range Finder 5
10.3.7 Exploration 2.3 Follow-up 5
10.3.8 Distance Warning Lights 5
10.3.9 Servo with Potentiometer 5
10.4 Functions
10.4.1 Functions 5
10.4.2 Functions 5
10.4.3 Using Functions 5
10.4.4 Using Functions with Parameters 5
10.4.5 Distance LEDs 5
10.4.6 Exploration: Using More Sensors 5
10.4.7 Exploration 2.4 Follow-up 5
10.4.8 Candy Dispensing System 5
10.4.9 SOS 5
10.5 Using Motors
10.5.1 Exploration: Controlling Motors 5
10.5.2 Exploration 2.5 Follow-up 5
10.5.3 Motors Example 5
10.5.4 Driverless Car 5
10.5.5 Car Simulation 5
10.5.6 Choose an External Sensor to Investigate 5
10.6 Program Control with Arduino Quiz
10.6.1 Program Control with Arduino Quiz 5
Animation and Games
11.1 Timers
11.1.1 Timers 1
11.1.2 Timers Quiz 5
11.1.3 Moving Ball 1
11.1.4 Magic 8 Ball 1
11.1.5 Crazy Ball 5
11.2 Random Circles
11.2.1 Example: Random Circles 1
11.2.2 Random Circles Quiz 5
11.2.3 Random Circles 1
11.2.4 Spinner Example 1
11.2.5 Growing Circle 5
11.2.6 Paint splatter 5
11.3 Random Ghosts
11.3.1 Example: Random Ghosts 1
11.3.2 Random Ghosts Quiz 5
11.3.3 Random Ghosts 1
11.3.4 Random Fireworks 1
11.3.5 Circle Wall 5
11.3.6 Brick Wall 5
11.4 Bouncing Ball
11.4.1 Example: Bouncing Ball 1
11.4.2 Bouncing Ball Quiz 5
11.4.3 Bouncing Ball 1
11.4.4 Hotspot Ball 5
11.4.5 Trail 5
11.5 Mouse Events: Mouse Clicked
11.5.1 Mouse Events: Mouse Clicked 1
11.5.2 Mouse Events: Mouse Clicked Quiz 5
11.5.3 Click For Circles 1
11.5.4 Click For Ghosts 1
11.5.5 Teleporting Ball 5
11.5.6 Pause 5
11.6 Mouse Events: Mouse Moved
11.6.1 Mouse Events: Mouse Moved 1
11.6.2 Mouse Events: Mouse Moved Quiz 5
11.6.3 Simple Painting 1
11.6.4 Colorful Drag to Paint 1
11.6.5 Coordinates 5
11.6.6 Target 5
11.7 Drawing Lines
11.7.1 Example: Drawing Lines 1
11.7.2 Drawing Lines Quiz 5
11.7.3 Drawing Lines 1
11.7.4 Leash 5
11.7.6 Mindset Survey 4 1
11.8 Key Events
11.8.1 Key Events 1
11.8.2 Key Events Quiz 5
11.8.3 Keyboard Square 1
11.8.4 Basic Snake 5
11.9 Crazy Ball Game
11.9.1 Crazy Ball Game 1 1
11.9.2 Crazy Ball Game Quiz 1 5
11.9.3 Crazy Ball Game 1 1
11.9.4 Crazy Ball Game 2 1
11.9.5 Crazy Ball Game Quiz 2 5
11.9.6 Crazy Ball Game 2 1
11.9.7 Click for Collision 5
11.9.8 Drag and Drop 5
11.10 Animation and Games Quiz
11.10.1 Animation and Games Quiz 5
Animation Challenges
12.1 Animation Challenges
12.1.2 Increasing Number of Shapes 10
Project: Breakout
13.1 Breakout
13.1.1 Bricks 10
13.1.3 Breakout 10
14.1 Arduino Challenges
14.1.1 Arduino Challenges: Extended Variable Types 5
14.1.2 Arduino Challenges: Extended Variable Types 5
14.1.3 Exploration: Advanced Arduino Programs 5
14.1.4 Exploration 3.1 Follow-up 5
14.1.6 Digital Watch, Pt 1 5
14.1.7 Digital Watch, Pt 2 5
14.1.8 Elevator 5
14.1.9 Project Reflection 5
14.2 Explore a New Sensor
14.2.1 Explore a New Sensor: Overview 5
14.2.2 Exploration: Getting Started with a New Sensor 5
14.2.3 Video/ Exploration 5
14.2.4 Example Program 5
14.2.5 How to add images 5
14.2.7 Creating a Lesson: Reflection 5
14.3 Step-by-Step Arduino Project
14.3.1 Research and Choose Project 5
14.3.2 Create Updated Directions 5
14.3.3 Step by Step Project Reflection 5
14.4 Final Project
14.4.1 Project Brainstorm and Selection 5
14.4.2 Build a Prototype 5
14.4.3 Test and Improve your Project 5
Final Project
15.1 Project Prep and Development
15.1.1 Planning and Design 5
15.1.2 Pseudocode 5
15.1.3 Write the Code! 10
Final Exam
16.1 Final Exam
16.1.1 JavaScript Final Exam Pt. 1: Multiple Choice 0
Midterm
17.1 Midterm
17.1.1 Midterm Pt 1: Multiple Choice 0
Extra Karel Practice
18.1 Extra Karel Practice
18.1.1 Functions Practice: K For Karel 10
18.1.2 Functions Practice: Karel Plants A Tree 10
18.1.3 Functions Practice: X Marks the Spot 10
18.1.4 While Loop Practice: Blackout 10
18.1.5 While Loop Practice: Move To Top 10
18.1.6 Functions and While Loop Practice: Opposite Corner 10
18.1.7 While Loop Practice: Checkered Row 10
18.1.8 For Loop Practice: Tall Hurdles 10
18.1.9 Functions and While Loop Practice: Row and Back 10
18.1.10 Functions and For Loop Practice: Opposite Squares 10
18.1.11 Stairway To Heaven 10
18.1.13 For Loop Square 5
Extra Karel Puzzles
19.1 Extra Karel Puzzles
19.1.1 Midpoint Karel 10
19.1.2 Target Karel 10
19.1.3 The Winding Yellow Road 10
19.1.4 Super Random Hurdles 10
19.1.5 Copy 10
19.1.6 Multiply 10
19.1.7 Fibonacci Karel 10
19.1.8 Comparison Karel 10
19.1.9 Swap 10
19.1.10 Sorting Karel 10
Functions and Parameters Practice
20.1 Functions and Parameters Practice
20.1.1 Taking a Power 10
20.1.2 Dot Rectangle 10
20.1.3 Print the Date 10
20.1.5 Concentric Circles 10
20.1.6 Graphics Staircase 10
20.1.7 The Weekend 5
20.1.8 Functions and Parameters Badge 0
Project: Tic Tac Toe
21.1 Tic Tac Toe
21.1.1 Tic Tac Toe: Part 1 10
21.1.2 Tic Tac Toe: Part 2 10
21.1.3 Tic Tac Toe: Full Game 10
21.1.4 Tic Tac Toe Badge 0
Project: Helicopter Game
22.1 Game Design: Helicopter
22.1.1 Introduction to Helicopter 1
22.2 Basics
22.2.1 Moving the Helicopter 1
22.2.2 Moving the Helicopter 5
22.2.5 Smoother Movement 1
22.2.6 Smoother Movement 5
22.3 Improvements
22.3.1 Colliding with Walls 1
22.3.2 Wall Collisions 5
22.3.3 Colliding with Obstacles 1
22.3.4 Obstacle Collisions 5