c++ on TXT
Forumsregeln
Bitte beachte die Forumsregeln!
Bitte beachte die Forumsregeln!
c++ on TXT
i have decided that i wil use c++ on the TXT
because python is not posible on a mobile robot
i know the folowing :
i need eclipse
how can i find out if i need the 32 or the 64 bit version ?
how de i set ecipse so that i can use it for TXT ?
where can i find the *.h and *.cpp file[s] i need ?
how do i get the TXT ready for c++ ?
where can i find example code ?
i need a list of instructions for doing this
any help is wekome !
because python is not posible on a mobile robot
i know the folowing :
i need eclipse
how can i find out if i need the 32 or the 64 bit version ?
how de i set ecipse so that i can use it for TXT ?
where can i find the *.h and *.cpp file[s] i need ?
how do i get the TXT ready for c++ ?
where can i find example code ?
i need a list of instructions for doing this
any help is wekome !
Re: c++ on TXT
That is not so difficult.In order of complexity (little => more):
• Programming for on-line use
• Programming for off-line use
• Programming for SLIs (RoboPro extension elements)
A)
Here is the basis for on-line C / C ++ programs for the TXT from fischertechnik: https://github.com/fischertechnik/txt_demo_c_online.
Under clone / download you can download the complete structure in a .zip and extract it into your solution map. The .sln is the solution file that contains all projects.
For this you need the free MS-Visual Studio 2019 (community version).
You can then compile and test the sample project immediately.
This can also be used as the basis for your own project.
B)
For off-line (local) programs you need Eclipse IDE for C / C ++ Developers, also for free:
Eclipse IDE 2019 12 https://www.eclipse.org/downloads/packa ... developers
In the readme you will find all instructions for downloading, installing and using the cross compiler (tool chain).
Follow those instructions exactly.
Download the https://github.com/fischertechnik/txt_demo_c_download
then place this in the empty workspace you have already created in Eclipse.
Here you will also find example projects.
You also need FIlezilla and Putty; this for uploading the executable to the TXT and monitoring the execution.
Since firmware 4.6.6, uploading is also possible with the web interface on the TXT.
C)
Third, also works in the Eclipse environment.
Drop in another workspace:
https://github.com/fischertechnik/txt_demo_ROBOPro_SLI
• Programming for on-line use
• Programming for off-line use
• Programming for SLIs (RoboPro extension elements)
A)
Here is the basis for on-line C / C ++ programs for the TXT from fischertechnik: https://github.com/fischertechnik/txt_demo_c_online.
Under clone / download you can download the complete structure in a .zip and extract it into your solution map. The .sln is the solution file that contains all projects.
For this you need the free MS-Visual Studio 2019 (community version).
You can then compile and test the sample project immediately.
This can also be used as the basis for your own project.
B)
For off-line (local) programs you need Eclipse IDE for C / C ++ Developers, also for free:
Eclipse IDE 2019 12 https://www.eclipse.org/downloads/packa ... developers
In the readme you will find all instructions for downloading, installing and using the cross compiler (tool chain).
Follow those instructions exactly.
Download the https://github.com/fischertechnik/txt_demo_c_download
then place this in the empty workspace you have already created in Eclipse.
Here you will also find example projects.
You also need FIlezilla and Putty; this for uploading the executable to the TXT and monitoring the execution.
Since firmware 4.6.6, uploading is also possible with the web interface on the TXT.
C)
Third, also works in the Eclipse environment.
Drop in another workspace:
https://github.com/fischertechnik/txt_demo_ROBOPro_SLI
Re: c++ on TXT
With the fischertechnik firmware the use of Python is also not a problem.
Python and FtRoboPy is available and works fine.
However C/C++ gives a lot more possibilities in relation with fischertechnik libraries.
Python and FtRoboPy is available and works fine.
However C/C++ gives a lot more possibilities in relation with fischertechnik libraries.
Re: c++ on TXT
update :
eclise down load + instalation has hapned
i have more experiance whit c++ than whit python
and whit python you have a indentation of 4 spaces
whit c++ i use 2 spaces for that
i need to have large char's in the IDE
so the line's can not be to long
eclise down load + instalation has hapned
i have more experiance whit c++ than whit python
and whit python you have a indentation of 4 spaces
whit c++ i use 2 spaces for that
i need to have large char's in the IDE
so the line's can not be to long
Re: c++ on TXT
Hi,
In Python you can use any number of spaces you like for indentation.
It just has to be consistent, because Python uses indentation syntactically (for grouping), not just for readability.
Wilbert.
In Python you can use any number of spaces you like for indentation.
It just has to be consistent, because Python uses indentation syntactically (for grouping), not just for readability.
Wilbert.
Het leven is hard. Een kokosnoot ook.
Re: c++ on TXT
Both Eclipse and MS-VS have a code formatter, so you don't need to format C/C++ code yourself.
In the general setting there are option to chance the predefined setting their you also able to chose between some semi-standards for code formatting.
In C/C++ but also in C#, spaces new lines and tabs don't have any meaning in your code.
The only exception are the pragma's the words which are starting with "#".
And literal strings.
In the general setting there are option to chance the predefined setting their you also able to chose between some semi-standards for code formatting.
In C/C++ but also in C#, spaces new lines and tabs don't have any meaning in your code.
The only exception are the pragma's the words which are starting with "#".
And literal strings.
Re: c++ on TXT
Can you elaborate on this? Is there some documentation regarding it? I'd be interested in using the line seeker, motion, color using the camera without having to deal with RoboPro. Is this available?
Re: c++ on TXT
@Foxi83
As you can see in the FtRoboPy, the video is available at Berkely socket port 65001.
In the fischertechnik GitHub sources you can find camera examples at two places:
In the factory software the TxtCamera shows another way to use the camera in a locale program.
Here you also will find an example of local image processing with OpenCV (also available on the TXT fischertechnik firmware).
In the online Examples is also an example to find about the use of Berkely socket port 65001.(this documentation exist already a very long time.)
The FtRoboPy is socket base interface that works in the on-line and locale mode the same (local mode IP= localhost or 127-0.0.1)
The interesting thing is that FtRoboPy is using the undocumented Berkely socket port 65002 for the I2C, but this can also be done in C/C++.
As you can see in the FtRoboPy, the video is available at Berkely socket port 65001.
In the fischertechnik GitHub sources you can find camera examples at two places:
In the factory software the TxtCamera shows another way to use the camera in a locale program.
Here you also will find an example of local image processing with OpenCV (also available on the TXT fischertechnik firmware).
In the online Examples is also an example to find about the use of Berkely socket port 65001.(this documentation exist already a very long time.)
The FtRoboPy is socket base interface that works in the on-line and locale mode the same (local mode IP= localhost or 127-0.0.1)
The interesting thing is that FtRoboPy is using the undocumented Berkely socket port 65002 for the I2C, but this can also be done in C/C++.
Re: c++ on TXT
@Foxi83
Additional, in detail:
https://github.com/fischertechnik/txt_t ... Camera.cpp
https://github.com/fischertechnik/txt_t ... xtCamera.h
https://github.com/fischertechnik/txt_d ... ter/Common
See the the header and source file ftProInterface2013TransferAreaCom:
but also the example: https://github.com/fischertechnik/txt_d ... ter/Camera
For the off-line mode you need to be a little bit creative.
https://github.com/ftrobopy/ftrobopy/bl ... trobopy.py
See line 747 e.v.
I hope that this is the answer on your questions.
Additional, in detail:
https://github.com/fischertechnik/txt_t ... Camera.cpp
https://github.com/fischertechnik/txt_t ... xtCamera.h
https://github.com/fischertechnik/txt_d ... ter/Common
See the the header and source file ftProInterface2013TransferAreaCom:
Code: Alles auswählen
bool StartCamera( int width=320, int height=240, int framerate=15, int powerlinefreq=50, const char *port = "65001" );
For the off-line mode you need to be a little bit creative.
https://github.com/ftrobopy/ftrobopy/bl ... trobopy.py
See line 747 e.v.
Code: Alles auswählen
def startCameraOnline(self):