Example how to programm ir multiple buttons read like "12"

I cant find any lead how to receive few consequtive codes from IRremote. Reading one button is trivial, but how to use multiple reads?
Thanks in advance.

Welcome to the forum

Please post your code that reads one button, using code tags when you do

Here is the easiest way to tidy up the code and add the code tags

Start by tidying up your code by using Tools/Auto Format in the IDE to make it easier to read. Then use Edit/Copy for Forum and paste what was copied in a new reply. Code tags will have been added to the code to make it easy to read in the forum thus making it easier to provide help.

Where are you stuck reading consecutive input from IRRemote ? What happens when you try to read consecutive codes ?

Store the values in a variable. For decimal numbers you can use something like below..

Once you know that you have received the first number (1,2,...), store it. When you receive the second number (1,2,...), multiply the stored number by 10 and add the second received number. Etc.

Thanks for answers. The second one makes the trick.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.