TV remote error in Blockly

coparu67

Senior Member
Hi
I think these two Blockly programs should work in a similar way.
error-tv-remote-1.PNG
error-tv-remote-2.PNG
Simulation works fine with both of them.

I use the same Remote and circuit in both programs.
Images show Code Explorer after pressing [7] key.

Program #1 works fine.

In the second program:
- I get error codes (Code Explorer) when running it.
(b3 takes the wrong value 1)

- If I uncheck "use timeout", there is no problem.
- If I delete the if-then-elseif-then block, there is no problem.
- If I reduce the if-then-elseif-then block to if-then block, there is no problem.

I don't know what is happening.
 

hippy

Technical Support
Staff member
Looking at the Basic code generated from each version of your Blockly program which is then compiled and downloaded into the PICAXE; there does not seem to be anything wrong with either.

It may be there is some issue with the Basic IRIN when timeout is used on the 18M2 which we will have to investigate. It could be that this is affected by some value within the firmware memory when the IRIN command is executed which could explain why removing all or part of the IF-THEN-ELSEIF appears to fix things.
 

coparu67

Senior Member
Looking at the Basic code generated from each version of your Blockly program which is then compiled and downloaded into the PICAXE; there does not seem to be anything wrong with either.
I agree with you. If I convert the Blockly file to BASIC and execute the code as BASIC, I get the same error.

It may be there is some issue with the Basic IRIN when timeout is used on the 18M2 ...
I don't agree here. Look at the new image. Same error without timeout.
error-tv-remote-3.PNG
 

Technical

Technical Support
Staff member
Please see today's 1.1.5 update which will fix this issue.

It's because Blockly only uses word variables, when irin normally would use a byte variable.
 
Top