Controlling Infrared Devices Remotely With Your Browser - Arduino Uno Quick Start Manual

Hide thumbs Also See for Arduino Uno:
Table of Contents

Advertisement

variable, and when we encounter a newline character, we also set the
input_available
flag to true. This way, the
new command has been received and which command it was.
In
loop
, we wait for commands. When a new command arrives, we check
whether it s supported. If it is supported, we send the corresponding control
code. Otherwise, we print an error message.
Compile and upload the sketch, and you can control the TV of your choice—a
Samsung TV, in this example—using any serial monitor, which is quite cool
already. The interface is still awkward for less geeky people, so in the next
section, you ll learn how to create a more user-friendly interface.

Controlling Infrared Devices Remotely with Your Browser

We ve already created several projects that you can control using a serial
monitor. For programmers, that s a nice and convenient interface, but as
soon as you want to present your projects to your nontechnical friends, you d
better have something more user-friendly and colorful.
Now we ll implement a Google Chrome app to create a nice user interface for
our cloned remote control. Before you proceed, you should read
Controlling the Arduino with a Browser, on page
The Chrome app s
manifest.json
cation name and grants the application access to the serial port.
RemoteControl/TvRemoteUI/manifest.json
{
"manifest_version": 2,
"name":
"TV Remote
Emulator",
"version": "1",
"permissions": [
"serial"
"app": {
"background": {
"scripts": ["background.js"]
}
},
"minimum_chrome_version":
}
Chapter 12. Creating Your Own Universal Remote Control
loop
function can determine whether a
267, if you haven t already.
file contains no surprises. It defines the appli-
],
"33"
www.it-ebooks.info
212
Appendix 4,
report erratum
discuss

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Arduino Uno and is the answer not in the manual?

Table of Contents