Your S3 comes ready to receive signals or commands from a Sony-programmable Remote Control. All you need to start is a remote control and the knowledge contained in these tutorials. Later on, we'll add more of a challenge by connecting an external IR receiver circuit to your hacker port.
An IR receiver can detect bursts of infrared (IR) light sent by something that emits IR light such as a remote controller (like that for a television). The receiver sends a pattern of high/low signals to one of the S3 robot’s Propeller microcontroller’s I/O pins. Remember that your S3 has an IR receiver built-in to the very front of the shell. (You can review this here: Avoiding Obstacles With Infrared).
Setup the Remote
To complete these first 4 tutorials, you will only need:
- (1) Sony-programmable Universal Remote (#020-00001) with batteries, or any other universal remote control that can be programmed as Sony compatible.
First, you will need to configure your remote for Sony protocol.
- If you purchased the Brightstar brand remote from Parallax (#020-00001), hold the Setup button until the light near it comes on. Enter 6-0-5 and the light should go off, indicating that it accepted the programming code. Refer to the illustration above, or the video below.
- If you have a different remote, follow its manufacturer instructions to program it with Sony protocol.
Introducing the Sony Remote Value Block
The Sony Remote value block is in the SENSOR > SONY REMOTE category of the BlocklyProp menu. The block returns a value detected by the IR receiver that indicates which button on the remote was pressed. If no button press has been detected, this block provides a value of -1.
This block's drop-down menu allows you to select the Propeller I/O pin connected to an infrared receiver. When using the S3 board type, the default option is the onboard sensor, located front and center of the S3 (which internally connects to P20). However, the drop-down also gives the option of connecting to P0..P5 on the S3's Hacker Port. The final tutorial in this series will go over how to connect an external IR receiver to your S3.
Did You Know?
In 1950, Zenith Radio Corporation developed the first remote intended to control a television. The remote, called Lazy Bones, was connected to the television by a wire. By the early 2000s, the number of consumer electronic devices in most homes significantly increased, along with the number of remotes to control those devices.
One solution to reduce the number of remotes needed is the universal remote, a programmable remote control with the operation codes for most major brands of TVs, DVD players, etc.
The primary technology used in home remote controls is infrared (IR) light. The signal between a remote control handset and the device it controls consists of pulses of infrared light, which is invisible to the human eye but visible through a digital camera, video camera or a phone camera. The transmitter in the remote control handset sends out a stream of pulses of infrared light when the user presses a button on the handset. A transmitter is often a light emitting diode (LED) built into the pointing end of the remote control handset. The infrared light pulses form a pattern unique to that button. The receiver in the device recognizes the pattern and causes the device to respond accordingly. That is what our S3 and the Sony Remote value block do.
Since infrared (IR) remote controls use light, they require line of sight to operate the destination device, meaning there must be a direct, unblocked path from the remote to the device. The signal can, however, be reflected by mirrors, just like any other light source. This will be a limitation for the remote control of our S3 since the onboard receiver is on the front of the S3. You must be in front of the S3 for it to “see the light.”
It is possible to accidentally reset the remote's programming. If you experience any problems with your remote (especially if it has worked previously), check the batteries first and then follow the procedure above to setup the remote again.
Let’s move on to the next tutorial and put the Sony Remote value block to work in a BlocklyProp program.