SUCCESS!!!! It works!
I just had to get rid of the serialprint line. I guess the extra little clock cycle that it took to print that line made the receiver not respond.
Now I just need to capture some codes. I guess I have two ways to do this.
-
capture the codes using serialprint and copy paste into notepad and tinker until it works. Hardcoded codes do sound nice.
-
put some code in the setup section that will say "press the light toggle switch" then capture that code into a variable called lighttoggle. Then prompt the user "press the fan on button" then capture that code into a variable called fanon.
I know how to use serialprint and I know how to create variables now. What I dont know is how to make it prompt, wait for input, then know when to move on to the next section.
Plus under option 2 I would have to store variables that were, 8, 16, however many bytes long and not just an instantaneous state change.