Formula Allcode losing bluetooth connection

For general Flowcode discussion that does not belong in the other sections.
medelec35
Matrix Staff
Posts: 1451
http://meble-kuchenne.info.pl
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 512 times
Been thanked: 472 times

Re: Formula Allcode losing bluetooth connection

Post by medelec35 »

Hello.
Lets get you going with a basic example available from Formula AllCode Resources website.

The following can only be done if the Robot is paired (It won't be connected, so the blue LED should be flashing until step 5 and running with the factory firmware.

It does not matter what mode the Formula Allcode is in, Demo, Test, API etc.

1. Download and extract files from the Flowcode section FA_FC_ProximityAlarmzip file from Formula AllCode Resources.
The project file we are interested in is called ProximityAlarm_v10.fcsx as that will allow you to directly communicate with Bluetooth!

2. determine the correct COM port to use by entering within the windows search box

Code: Select all

rundll32.exe shell32.dll,Control_RunDLL bthprops.cpl,,2
then press Enter key

3. Make a note of the COM that the Direction shows Outgoing
Buggy1.png
Buggy1.png (12 KiB) Viewed 286 times
4. Open ProximityAlarm_v10.fcsx, within properties of FormulaAllCodeAPI1, set the COM port to the same as Outgoing.
In my case its 31

5. Select Debug > Run THe Blue LEDshould now be solid.
place your figer near the front middle sensor and oyur PC will play the audio speech within the RealSpeak function.
In this case "Hello"

Can you let me know if it all works for you please?


I just obtained a Formula AllCode from stock today, and the above is working perfectly.

It's what Steve has been saying.
Your Formula AllCode will be paired, but not connected, until it's accessed by a 3rd party app that's connected to the buggy's COM port,
Martin

D_Addow
Posts: 8
Joined: Wed Mar 20, 2024 2:12 pm

Re: Formula Allcode losing bluetooth connection

Post by D_Addow »

Hi thanks for the help Martin.

With step 4, what software/app are you using to run and open ProximityAlarm_v10.fcsx ?
Because whenever I click on the file to open it, it says I have to select an app to open an fcsx file and the only options for that appear for me is the standard Windows notepad app and Notepad++

Thanks again,
Daniel

medelec35
Matrix Staff
Posts: 1451
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 512 times
Been thanked: 472 times

Re: Formula Allcode losing bluetooth connection

Post by medelec35 »

Hi Daniel.
fcsx a PC developer file.
You will need to download Flowcode v10 from here
You won't require any of the Toolchains.
Since Flowcode v10 is free I thought it was the quickest way to test the Buggy.
If you do want to install Flowcode then after its installed, you will need to run Full database components update.
Help > Library updates... Change Files in-use to Full database then close and reopen Flowcode.

One you have established the buggy is connecting to Bluetooth, you can commence with Python within the Python environment.
Martin

D_Addow
Posts: 8
Joined: Wed Mar 20, 2024 2:12 pm

Re: Formula Allcode losing bluetooth connection

Post by D_Addow »

Hi Martin,

The code and car is working now, thank you very much :)

Just to clarify is Flowcode what I should be using to run the python scripts you have in the resources sections of the website (like 'FA_PY_Dance') or would I simply be able to just open the file normally and it will run? I will change the COM port to match mine first of course.

Thanks,
Daniel

Steve-Matrix
Matrix Staff
Posts: 1253
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 167 times
Been thanked: 277 times

Re: Formula Allcode losing bluetooth connection

Post by Steve-Matrix »

Flowcode cannot run the Python scripts. You should run those normally. Just make sure you have the FA.py file in the same (unzipped) folder as your project file.

medelec35
Matrix Staff
Posts: 1451
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 512 times
Been thanked: 472 times

Re: Formula Allcode losing bluetooth connection

Post by medelec35 »

Hello.
As Steve stated, Flowcode will not run the python scripts, it will only run the files that are within the Flowcode section of Formula AllCode Resources.
It was the quickest method for me to establish there is not an issue with Bluetooth.
Martin

D_Addow
Posts: 8
Joined: Wed Mar 20, 2024 2:12 pm

Re: Formula Allcode losing bluetooth connection

Post by D_Addow »

Ok thank you very much for the help

All the best,
Daniel

Post Reply