Rudimentary code was cobbled together from Arduino example code and Ken Shirriff's infrared remote library. Naturally, this failed. Code was stripped away, one line at a time, until there was just enough for an Arduino to receive and infrared remote signal and print it to the screen. In the animation below it's possible to see different buttons displaying codes on the screen.
Each button press corresponded to a code on the screen and that code could be displayed in different formats. The most logical way to display these codes, and Ken Shirriff's default, was hexadecimal. The basic code was modified so that each button press would display binary, hex, octal, and decimal. For those who are unfamiliar with this numbering, it is important to keep in mind that these are simply different ways of displaying the name information, they are all the same according to Arduino. It would be like writing a number in roman numerals, tally marks and 0-9.
Once the codes were known it was easy enough to change the way they printed. Instead of portraying each button press as an unrelatable code, a string was printed which corresponded to the button being pressed. Pressing the button labled one used to print FF6897 but now it could print "1" and pressing the button labled OK would now print "OK". This processing will probably not be done in the Arduino but it was valuable to recognize how the coding worked.
A very simple remote was used for this example and they can be found at online retailers very inexpensively. Newer television remotes do not necessarily work as simply. The remote for my television sent three bursts for each press with the first and third burst being identical. Apple remotes send their serial number with each press so banks of computers don't interfere with one another.
One LED was programmed to respond to a particular code: FFFFFF. This code was encountered when a button was held down. Remote receivers recognize this code as an instruction to repeat their last command. For example, if a user holds the button to increase volume on a television the volume level will increment as long as the button is held. The LED would toggle whenever it saw this FFFFFF repeat signal but it would not print anything to the screen.
Downloads:
The rest of the posts for this project have been arranged by date
First time here?
Completed projects from year 1
Completed projects from year 2
Completed projects from year 3
Disclaimer for http://24hourengineer.blogspot.com/ and 24hourengineer.com
This disclaimer must be intact and whole. This disclaimer must be included if a project is distributed.
All information in this blog, or linked by this blog, are not to be taken as advice or solicitation. Anyone attempting to replicate, in whole or in part, is responsible for the outcome and procedure. Any loss of functionality, money, property or similar, is the responsibility of those involved in the replication.
All digital communication regarding the email address 24hourengineer@gmail.com becomes the intellectual property of Brian McEvoy. Any information contained within these messages may be distributed or retained at the discretion of Brian McEvoy. Any email sent to this address, or any email account owned by Brian McEvoy, cannot be used to claim property or assets.
Comments to the blog may be utilized or erased at the discretion of the owner. No one posting may claim property or assets based on a post.
This blog, including pictures and text, is copyright to Brian McEvoy.
2017-04-02 (Su)
Printing remote codes
Each button press corresponded to a code on the screen and that code could be displayed in different formats. The most logical way to display these codes, and Ken Shirriff's default, was hexadecimal. The basic code was modified so that each button press would display binary, hex, octal, and decimal. For those who are unfamiliar with this numbering, it is important to keep in mind that these are simply different ways of displaying the name information, they are all the same according to Arduino. It would be like writing a number in roman numerals, tally marks and 0-9.
Different code displays
Once the codes were known it was easy enough to change the way they printed. Instead of portraying each button press as an unrelatable code, a string was printed which corresponded to the button being pressed. Pressing the button labled one used to print FF6897 but now it could print "1" and pressing the button labled OK would now print "OK". This processing will probably not be done in the Arduino but it was valuable to recognize how the coding worked.
A very simple remote was used for this example and they can be found at online retailers very inexpensively. Newer television remotes do not necessarily work as simply. The remote for my television sent three bursts for each press with the first and third burst being identical. Apple remotes send their serial number with each press so banks of computers don't interfere with one another.
Displaying relatable data with each button press
One LED was programmed to respond to a particular code: FFFFFF. This code was encountered when a button was held down. Remote receivers recognize this code as an instruction to repeat their last command. For example, if a user holds the button to increase volume on a television the volume level will increment as long as the button is held. The LED would toggle whenever it saw this FFFFFF repeat signal but it would not print anything to the screen.
Demonstrating and LED toggling upon the repeat signal
Downloads:
The rest of the posts for this project have been arranged by date
First time here?
Completed projects from year 1
Completed projects from year 2
Completed projects from year 3
Disclaimer for http://24hourengineer.blogspot.com/ and 24hourengineer.com
This disclaimer must be intact and whole. This disclaimer must be included if a project is distributed.
All information in this blog, or linked by this blog, are not to be taken as advice or solicitation. Anyone attempting to replicate, in whole or in part, is responsible for the outcome and procedure. Any loss of functionality, money, property or similar, is the responsibility of those involved in the replication.
All digital communication regarding the email address 24hourengineer@gmail.com becomes the intellectual property of Brian McEvoy. Any information contained within these messages may be distributed or retained at the discretion of Brian McEvoy. Any email sent to this address, or any email account owned by Brian McEvoy, cannot be used to claim property or assets.
Comments to the blog may be utilized or erased at the discretion of the owner. No one posting may claim property or assets based on a post.
This blog, including pictures and text, is copyright to Brian McEvoy.
2017-04-02 (Su)
Comments
Post a Comment