Bluetooth joystick for controlling RC Tank

Using an Arduino and the HC-6 bluetooth module, I was able to control my homemade RC Tank. So… Here is the App that I built.
It sends to the Arduino the current Angle and Radius of the joystick . I use the Angle for direction and the Radius for speed.
I share the project here in case someone has the same need.

AIA: Bluetooth_Control.aia (210.3 KB)

INO:bluetooth_control.ino.zip (877 Bytes)

11 Likes

Thanks for sharing @Redox, really nice UI. If you have any videos or info on your RC tank feel free to share that here too!

1 Like

Yes, I will :wink:

2 Likes

Very interesting and nice project. Thank you very much for sharing It. Where did you get the imagens?

1 Like

3 posts were split to a new topic: Omni Wheels: Bluetooth Robot Controller

Sorry for the late reply. I’m UI designer. :slight_smile:

1 Like

can you provide the joystick extension please?

If you would have looked inside the aia file then you would have seen that there is no extension. It’s all made with sprites and it is looking great. So please next time look before asking.

4 Likes

Hi redox! please can i get an image of your block of codes? and also an image of the codes from the arduino IDE. Thanks!

why don’t you just download the project (download link see first contribution in this thread) and take a look at it yourself?
Taifun

4 Likes

alright!

Yes of course!

thank you! why i can’t import.aia in appinventor? http://ai2.appinventor.mit.edu

Unfortunately, looks like there is no way to open the file anymore…
Is implementation of such joystick still possible? If so can you please provide some info about how you did it?
Thanks :slight_smile:

Projects that are .aia files are no longer supported in Thunkable. I also don’t think the user who created this post is still active, unfortunately. If you want to work with bluetooth, you could start a new topic and post what you’ve tried.

Bluetooth works just fine, the challenge is the joystick which I am trying to implement.
If I could see somehow a screenshot of blocks that were used in the file attached to this post this would really really help me

When you connect to the joystick are you receiving messages?

What blocks have you tried to use?

I am not sure what you mean by that
I am trying to create a 1 axis joystick by using a canvas with a draggable stripe , basically just a slider that adjust rc car speed.
There are some challenges that I didn’t solve yet:

  1. How to allow dragging only on y axis
  2. How to make sure it will not be draggable outside the canvas (it should stop at the edge

This will do it but you need a mouse up / click released event which doesn’t exist:

I recommend adding a comment to this feature request I submitted in June:

For what it’s worth, the “when sprite is dropped” block does not work in this situation:

And I think I know why. The documentation states “This event triggers when the user stops dragging the sprite.” But in this case, I’m not using a draggable sprite. I’m just changing the y position.

Thank you for that info!
I think I will just use a slider component instead, it seems to work, but the problem is I don’t think it can be rotated and I need a vertical slider
so for now my solution is to lock the screen in portrait mode while the user will be using it in landscape mode, so the slider will be vertical, but then I can’t use labels because there is no way to rotate them as well :face_with_raised_eyebrow: