Steuerung des BT Smart Controllers von TX/TXT / Controlling BT Smart Controller from TX/TXT

Alles rund um TX(T) und RoboPro, mit ft-Hard- und Software
Computing using original ft hard- and software
Forumsregeln
Bitte beachte die Forumsregeln!
Antworten
Benutzeravatar
rubem
Beiträge: 240
Registriert: 10 Feb 2014, 17:45
Wohnort: Porto Alegre, RS, Brasil

Steuerung des BT Smart Controllers von TX/TXT / Controlling BT Smart Controller from TX/TXT

Beitrag von rubem » 28 Dez 2021, 22:22

Hi everyone,

I've built a simple test robot with a BT Smart Controller and two motors. I was able to successfully control it from the ROBO Pro Smart app for Android, and also from a web page running WebBTSmart by Till Harbaum, both from my PC and from my phone. However I'd very much prefer to use a physical device with buttons. I have both a TX and a TXT (the "classic" one, not the TXT 4.0) and I'd like to use one of them for this purpose. However I'm not at all proficient with ROBO Pro (I prefer to use Arduinos) so I need help here.

Has anyone already done it? If so, is there any available ROBO Pro programs for this?

Many thanks in advance,

Rubem


============ Google Translate =============


Hallo allerseits,

Ich habe einen einfachen Testroboter mit einem BT Smart Controller und zwei Motoren gebaut. Ich konnte es erfolgreich über die ROBO Pro Smart App für Android steuern und auch über eine Webseite mit WebBTSmart von Till Harbaum, beide von meinem PC und von meinem Telefon. Ich würde jedoch sehr viel lieber ein physisches Gerät mit Tasten verwenden. Ich habe sowohl einen TX als auch einen TXT (den "klassischen", nicht den TXT 4.0) und würde gerne einen davon für diesen Zweck verwenden. Ich bin jedoch mit ROBO Pro überhaupt nicht vertraut (ich bevorzuge Arduinos), daher brauche ich hier Hilfe.

Hat es schon jemand gemacht? Wenn ja, gibt es dafür verfügbare ROBO Pro-Programme?

Vielen Dank im Voraus,

Rubem

Rubem

Benutzeravatar
Dirk Fox
ft:pedia-Herausgeber
Beiträge: 1833
Registriert: 01 Nov 2010, 00:49
Wohnort: Karlsruhe
Kontaktdaten:

Re: Steuerung des BT Smart Controllers von TX/TXT / Controlling BT Smart Controller from TX/TXT

Beitrag von Dirk Fox » 29 Dez 2021, 10:57

Hi rubem,
rubem hat geschrieben:
28 Dez 2021, 22:22
However I'd very much prefer to use a physical device with buttons.
the most preferable way to program and control the BT smart controller is by using ftScratch - all inputs can be applied to as univeral ports (digital and analog), and you can include your keyboard as input device. ftScratch is easier and much more powerful than e.g. ROBO Pro Light/Smart...

For a start, call ftScratch3.com, connect to your BT smart controller (via USB or BLE) by executing FTScratchBTSmart.exe and include the BTSmart extension (via the button in the left corner of the ftScratch3 IDE) in ftScratch.

Programming is straightforward - give me a hint, if I should send you a coding example for your little robot.

Have fun,
regards,
Dirk

Benutzeravatar
MasterOfGizmo
Beiträge: 2720
Registriert: 30 Nov 2014, 07:44

Re: Steuerung des BT Smart Controllers von TX/TXT / Controlling BT Smart Controller from TX/TXT

Beitrag von MasterOfGizmo » 29 Dez 2021, 11:22

He does not need any help controlling the BT Smart from a PC. He already found several ways to do that with RoboProLight or Javascript

He's asking for a way to control the BT Smart from the TXT. I don't see how Scratch can do that. Can it?
Arduino für fischertechnik: ftDuino http://ftduino.de, ftDuino32 http://ftduino.de/32

Benutzeravatar
MasterOfGizmo
Beiträge: 2720
Registriert: 30 Nov 2014, 07:44

Re: Steuerung des BT Smart Controllers von TX/TXT / Controlling BT Smart Controller from TX/TXT

Beitrag von MasterOfGizmo » 29 Dez 2021, 11:41

Controlling the BT Smart from the TXT is physically possible and has been proven here: https://www.youtube.com/watch?v=P9tyf3ghEMg&t=17s

However, that's a Python setup running on the community firmware. IMHO there is one way to do this from within RoboPro:
  • Create a C program that does the same on a TXT running the stock firmware
  • Wrap this into a SLI component to make it accessible from RoboPro
It may actually be possible to re-use the Python code from https://github.com/harbaum/cfw-apps/tre ... smart_demo as the TXT nowadays comes with Python. But I don't know how to call Python code from RoboPro. Torsten may be able to help with that,

Edit: You can control the BT Smart via USB or Bluetooth. What are you intending to connect it to the TXT by?
Arduino für fischertechnik: ftDuino http://ftduino.de, ftDuino32 http://ftduino.de/32

Benutzeravatar
Dirk Fox
ft:pedia-Herausgeber
Beiträge: 1833
Registriert: 01 Nov 2010, 00:49
Wohnort: Karlsruhe
Kontaktdaten:

Re: Steuerung des BT Smart Controllers von TX/TXT / Controlling BT Smart Controller from TX/TXT

Beitrag von Dirk Fox » 29 Dez 2021, 13:09

Hi rubem, Till,
MasterOfGizmo hat geschrieben:
29 Dez 2021, 11:22
He's asking for a way to control the BT Smart from the TXT.
I understood that rubem wants to control the BT smart controller from a *device with buttons*. That can be the TX or TXT (via workarounds...), but using scratch, you can use (in contrast to the mentioned other programming environments) the keyboard to control the movements of the robot he built. But, maybe, I misinterpreted rubem's posting.

Regards,
Dirk

Benutzeravatar
MasterOfGizmo
Beiträge: 2720
Registriert: 30 Nov 2014, 07:44

Re: Steuerung des BT Smart Controllers von TX/TXT / Controlling BT Smart Controller from TX/TXT

Beitrag von MasterOfGizmo » 29 Dez 2021, 13:34

Dirk Fox hat geschrieben:
29 Dez 2021, 13:09
I understood that rubem wants to control the BT smart controller from a *device with buttons*.
Then what's different in running Javascript on a PC as he already does versus running Scratch on a PC as you suggested? I don't think there's anything Scratch can do that is not possible in the Javascript setup he already has. Scratch3 actually is Javascript ...
Arduino für fischertechnik: ftDuino http://ftduino.de, ftDuino32 http://ftduino.de/32

Benutzeravatar
rubem
Beiträge: 240
Registriert: 10 Feb 2014, 17:45
Wohnort: Porto Alegre, RS, Brasil

Re: Steuerung des BT Smart Controllers von TX/TXT / Controlling BT Smart Controller from TX/TXT

Beitrag von rubem » 29 Dez 2021, 15:37

Hi,

@DirkFox and @MogG, thanks for your responses.

Dirk, yesterday I did exactly what you said, albeit via USB (FTScratchBTSmart.exe wasn't able to find the BT Smart for some reason). However my goal would be to build a portable Bluetooth remote control with physical buttons.

Till, the video is a nice proof of concept, although it says the BT Smart is being controlled via USB, not Bluetooth. The ftc is no problem, I already tested it succcessfully some months ago. However Python looks like a foreign language to me. I'm comfortable with C, C++ and JavaScript, but not Python. This monkey thinks he's a bit too old to learn new tricks ;)

In fact I've already adapted your JavaScript script to use a joystick-like UI. The UI is here and the code is here:

msedge_2021-12-29_11-32-27.png
msedge_2021-12-29_11-32-27.png (24.58 KiB) 2622 mal betrachtet

Thanks for now,

Rubem
Zuletzt geändert von rubem am 04 Jan 2022, 15:03, insgesamt 1-mal geändert.

Benutzeravatar
MasterOfGizmo
Beiträge: 2720
Registriert: 30 Nov 2014, 07:44

Re: Steuerung des BT Smart Controllers von TX/TXT / Controlling BT Smart Controller from TX/TXT

Beitrag von MasterOfGizmo » 29 Dez 2021, 21:07

In that video the BT Smart is indeed controlled via USB. But the code I linked to does the same via Bluetooth.

Edit: Really great to see someone using the WebBT demo I wrote. In Germany Javascript is even teached in schools. I wonder why noone ever realized how nicely the BT Smart fits into that.
Arduino für fischertechnik: ftDuino http://ftduino.de, ftDuino32 http://ftduino.de/32

Benutzeravatar
Dirk Fox
ft:pedia-Herausgeber
Beiträge: 1833
Registriert: 01 Nov 2010, 00:49
Wohnort: Karlsruhe
Kontaktdaten:

Re: Steuerung des BT Smart Controllers von TX/TXT / Controlling BT Smart Controller from TX/TXT

Beitrag von Dirk Fox » 30 Dez 2021, 12:11

Hi rubem, Till,

your WebBT extension is very smart.

Perhaps JavaScript is a considerable better second step (after Scratch or Blockly)...
I think I have to reconsider our current programming learning concept for schools.

Anyway: In combination with a capable programming environment, the BT smart controller is much more powerful than one can expect looking at the applications promoted by fischertechnik; that's for sure.

Regards,
Dirk

Benutzeravatar
MasterOfGizmo
Beiträge: 2720
Registriert: 30 Nov 2014, 07:44

Re: Steuerung des BT Smart Controllers von TX/TXT / Controlling BT Smart Controller from TX/TXT

Beitrag von MasterOfGizmo » 30 Dez 2021, 22:54

Dirk Fox hat geschrieben:
30 Dez 2021, 12:11
I think I have to reconsider our current programming learning concept for schools.
"our" hopefully doesn't include the guys from fischertechnik.

I am doing this for people like Rubem and not to save fischertechik from having to pay for their own developers.
Arduino für fischertechnik: ftDuino http://ftduino.de, ftDuino32 http://ftduino.de/32

Benutzeravatar
Dirk Fox
ft:pedia-Herausgeber
Beiträge: 1833
Registriert: 01 Nov 2010, 00:49
Wohnort: Karlsruhe
Kontaktdaten:

Re: Steuerung des BT Smart Controllers von TX/TXT / Controlling BT Smart Controller from TX/TXT

Beitrag von Dirk Fox » 31 Dez 2021, 00:38

MasterOfGizmo hat geschrieben:
30 Dez 2021, 22:54
"our" hopefully doesn't include the guys from fischertechnik.
???

As you should know: I'm neither in the position nor in a relationship to the company to develop "a programming learning concept for schools" for fischertechnik.

It's my personal initiative I'm talking about: Encouraging and supporting technical and programming skills of young people by using fischertechnik construction kits in combination with controllers like the BT Smart, the TXT or the ftDuino. We have - however - to take into account several restrictions, like our limited ressources to share our knowledge with teachers, kids and parents, as well as the preferable compatibility to already existing material (and knowledge) in schools, or the desirable goal of reducing the diversity of material without a reduction of possible applications.

After some intensive experiments I'm beginning to believe that the BT Smart Controller could be a wise reduction to stimulate creativity... and provide a smart way to extend programming skills (e.g. by using JavaScript) after some experiences with Scratch without the need to switch to a different controller.

Regards,
Dirk

Benutzeravatar
MasterOfGizmo
Beiträge: 2720
Registriert: 30 Nov 2014, 07:44

Re: Steuerung des BT Smart Controllers von TX/TXT / Controlling BT Smart Controller from TX/TXT

Beitrag von MasterOfGizmo » 31 Dez 2021, 17:57

Dirk Fox hat geschrieben:
31 Dez 2021, 00:38
As you should know: I'm neither in the position nor in a relationship to the company to develop "a programming learning concept for schools" for fischertechnik.
I wasn't intending to offend you and yes, I sure know your projects here and wouldn't have anything against using my stuff there.

But there are also those educational sets you IMHO prepare and document for ft. While I am actually impressed by how much time you spend there I personally don't feel like I want to support a company like ft that way.
Arduino für fischertechnik: ftDuino http://ftduino.de, ftDuino32 http://ftduino.de/32

Antworten