This weekend my High School contacted me to see if I could help them with EasyC. The problem was that all the motors where moving the way they were programmed to. The problem was that the motors had some kind of lag/pulse which made everything inefficient. When I made some modifications I managed to fix 2/3 pulse cases.
I still can’t fix a pulse which occurs when I try to move the robot in a direct X or Y axis. If I rotate it 360 degrees (remember it’s Holonomic) it works perfectly. But when I run it directly the motors start to pulse.
If an example of the code is needed I would gladly provide it.
Sounds like there may be some PWM signals being mixed in the programming. Since I do not know the configuration of your holnomic system I can’t be very specific, but what you are looking for in your programming code is 2 different channels trying to operate a single motor output.
Are you telling one motor to be controlled by two controller axes? That usually creates a pulse message since it expects both axes at once or nothing. If you use both axes, it’ll work fine, but one axes on the controller at a time will say “Do this at __ interval, and the other axes will fill in the rest of the interval.” The best thing to do is to work with the coding where you don’t need that (also, giving a motor a value from a variable sometimes gives a constant pulse message despite what the controller says, so again it’s all how you program what you want to make the robot do what you want). Usually having that setup is inefficient regardless, so try to use the Tank or Arcade drive systems to have the robot work as needed but mess with the settings to get the holonomic to work. Also, consider that if you want a certain configuration to work, tell the controller to only use one set of channels if a certain condition is met. That way one motor isn’t accessing several channels, but rather one channel.
it must be your programming
i had that trouble too
but then i went to smart kids holonomic drive thread and fixed it
theres a downloadable version in that thread too
in both easyc and robotc
(they are in the “x” configuration)
(+ should be easier to program)
If you could please link me to that thread I would deeply appreciate it.
@Krummel - Yeah when I had a similar problem in FIRST but I managed to fix it very fast since I was familiar with LV. But I’m need to EC.
I did a small modification using an IF statement based if the channel is transmitting then excecute a signal. If not the signal is latent until IF is called. So there is only 1 signal going through the PWM.
I’ll update you guys tomorrow since the kids have to try it at school and I’m at the other side of the country.
Anyway that thread should have everything you need. WATCH THE VIDEO! I go over a few easyC specifics, one of which might be related to your problem. Then, if the tutorial helped you post a thank you to bump the topic so more teams will find that thread.
I had a similar problem and so thankfully I found Cody’s tutorial. Unfortunately, I can’t seem to get my programming to work as I have a ‘+’ drive. Does anybody have the code for ‘+’ drives? I can’t find it anywhere else :l
For a plus drive you can just use “joystick analog to motor” so you would have one of these (likely using channel two) for each of your wheels that drives you forward. You would also have one for (likely using channel 1) for each of the wheels that drives you sideways.
To spin just make 4 of the “joystick analog to motor” blocks all for one channel (i use channel 4) this channel will control all of the motors at once to make you spin. You might have to put the robot on blocks and look at the wheels to make sure they spin in the correct directions, if not just invert them with the little “invert” button in each block of code that they are spinning in the wrong direction.
Let me know if that is confusing, it is kinda trick to explain code in the morning :rolleyes: