Steering Wheel Rotation 180° CW to 180° CCW

Should be only a left or right drag, uses the x value ?

1 Like

Neither here nor there, at least it works as intended.

1 Like

So, in pursuit of the angle from rotating the steering wheel sprite, I have tried some balls! When the steering wheel is rotated, anti-clockwise (left-handed User), by dragging about it's center, balls at every 15 degrees trigger their drag event and the correct angle is reported. However, if the User then rotates the wheel clockwise or more than 360, still same drag, the balls dragging events are not triggered again. So that idea is related to a collection of balls in a well known saying....

2 Likes

I’ve been using bits and pieces of the various versions that we’ve been sharing and it’s getting closer.

I’ve given up on the 720 degrees of rotation idea as it doesn’t seem to be worth the aggravation. The wheel wants to flip 180 after it reaches 180.

Instead I’m thinking that limiting the speed of the wheel’s rotation wheel prevent the vehicle wheels from going lock-to-lock at an un realistic speed.

I’ll do a video as soon as I can pry myself out of bed.

I also wanted to share this app, that originally inspired me to go with an app, vs. a radio.

... it doesn't in my Project, because of handedness. A left hander would start on the left of the wheel, a right-hander on the right of the wheel, hence the two red dots on the image.

We're making great progress on the steering wheel and having lots of fun in the process! (that is to say, I am having fun... :grin:)

Thanks again for all your help!

I added this bit of control to reorient the wheel back to center when .Touchup is detected.

image

At first it only included the "set WHEEL . Heading to 0" blocks. Then I realized that I didn't want the wheel to SNAP back to zero.

I added the "Enabled, Interval and Speed" in an attempt to slow the wheel as it returns to the "Home" "Heading 0" but I have not been able to affect the speed that the is spinning.

I do not understand all I know about this problem...

So here is my failed version. It does snap back to zero because that was originally your request, but easy to take that feature out. Turn the wheel with thumb or finger on a red dot. If using your left-hand, tick the box.

SteeringWheel_balls.aia (72.9 KB)

Just right-mouse on this block and select "Disable Block":

DisableSnapToZero

I do want it to return. Just not so fast.

Like 180° in 1second.

You will need a timed routine (that can be interrupted if needed) that will slowly return the wheel to centre (0) from the dragged position/angle.

So I was not even in the ballpark with this rationale?

image

What if the wheel/drag speed is limited throughout the entire routine?

Just needs a Clock Timer Don:

Looks great Chris!

I'll incorporate it in the morning.

Been working on my all-wheel-drive, articulated-front-wheel, adjustable-ride-height slot car design (AUDI RS5 QUATTRO).

Have a good night!

1 Like

Good Evening,

The attached .aia represents many hours of experimentation. I am pleased to say that I am very happy with the progress so far. I have a lot of functionality yet to add but I am gaining some confidence with my application of this application application.

I just started experimenting with slowing the speed of the "TouchUp" function where the wheel returns to the initial Heading when contact with the touch screen is broken.

Can I ask if I am even close to being in the ballpark on this one?

TIA.

Don.

MAN_06.aia (612.4 KB)

Hi Don

The Clock_RestoreWheelToHome block in post #34 is the way to go about it.

1 Like

I was having trouble following/recreating the code.

I think I have it now. Except it only slows to reset speed during the clockwise ReturnToHome direction. (for both the left and right wheels). I created separate Timer, TouchUp and Dragged control blocks, Thinking the left wheel timer wasn't working, before I realized it was also only affecting the speed in the clockwise direction. So, once the wheel is rotated past 180° its return speed is no longer governed by the timer.

I'll try and figure out a solution for this after I eat some lunch. Unless you can suggest how to add this functionality.

*Wheels need to be limited to 180° rotation in both the CW/CCW directions
*Wheels need to utilize the timer function in both directions

Cheers,

MAN_06.aia (613.3 KB)

MAN_07A.aia (1.0 MB)

The code is perhaps not as streamlined as it could be, but I believe I have solved most of the issues we discussed.

I'm still having trouble determining the proper code for the TouchUp ResetWheel, Heading display function. It only displays when Dragged.

1 Like

MAN_08.aia (1.0 MB)

Still trying to code the Heading Angle for the steering wheels in a way that isn't dependent on either Drag or TouchUp.

As far as I can tell, the only access to "currentX" and "currentY" is from within the when___Dragged, control block.

I tried creating a universal set of globally initialized currentX & Y coordinates, but, being a newbie, I have so-far, been unsuccessful.

Does anyone have a suggestion of how to accomplish this function?

Thanks,

Don.

Hi Don

there could be a different, easier approach with an extension that can rotate an Image component. I have not tested it.

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