Weird program problem
Attached, is a program, in SXB to control my Create robot. The problem is that the robot starts doing some random movements, as soon as it's turned on, but it has only been programmed to respond to the remote conrol, and not·random movements. I have double checked the interrupt code, and that seems to be OK, at least I do not see any obvious mistakes. The room that I am working in does not have anything that is putting out an IR signal, other than the remote control when I press a button. So, somehow the program is getting these random code instructions to control the robot.
This is the same program that I had worked on many, many months ago, and at that time I was having trouble with the arrays, but this time around the arrays seem to work. Must be the magic of starting from scratch. So, now I must have introduced another problem. It would be nice if another set of eyes would take a look see.
Thanks
Ray
This is the same program that I had worked on many, many months ago, and at that time I was having trouble with the arrays, but this time around the arrays seem to work. Must be the magic of starting from scratch. So, now I must have introduced another problem. It would be nice if another set of eyes would take a look see.
Thanks
Ray
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST
1uffakind.com/robots/povBitMapBuilder.php
1uffakind.com/robots/resistorLadder.php
I wrote a small non-interrupt version of the program, and ran that, with the same problem occuring. Thinking that it might be a hardware problem, I pulled out a second brand new Create, and the same thing occurs with that one, testing both of the programs on it. So, now I am really stumped as to what the problem could be. The only thing left is try a different demodulator, but I thought with those things it was either they worked or they did not work.
The second program that I wrote, I was trying to implement a State Machine technique, so if I ever solve this puzzle, I will finish the second program, and post it.
Thanks
Ray
You're using an SX52?
Have you tested just the IR receive portion ( a watch+break on the command variables would do it) to see that you're getting the codes from the remote properly? That would at least tell you for sure if the problem is on the receive side of things or in the translating and tx'ing to the Create.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST
1uffakind.com/robots/povBitMapBuilder.php
1uffakind.com/robots/resistorLadder.php