Secret Code, Remote Control Robots, Walking Robot etc.

Not so secret code

This is a program that randomly produces a number and then this number is entered into the robot by clicking a button the appropriate number of times for each digit. If the code is entered correctly then the safe door is opened, if not then the safe stays closed.  Some of the concepts that are covered in this lesson are random number generators, variables, wait blocks, loop interrupts, math blocks, comparison blocks and switch statements. The code could be modified to use a hard-coded secret code that is not displayed, so only the person that knows the code could open the safe. The code is quite extensive, so I split it into 3 parts that follow sequentially.

Part 1

Part 2

Part 3

Walking Robot

I’ve been trying to come up with a design for a walking robot that is relatively easy to build and modify for some time. This is the result. The code for this is very straight forward, basically just a loop with a move steering block.

Remote Control Robots

We constructed some remote control cars and engaged in some robot battles. The code consisted of two components a sender module and a receiver module. The sender robot would send a message to the receiver robot which would interpret the message and perform the appropriate action. The robots used Bluetooth as a communications protocol.


Sender Code:

Receiver Code:


You Might Also Like