hi,
which are the first steps for C++ programmers?
In the installation guide there are only 2 sections ( C/C++ is still missing yet! ) :
Programming Options
Choose one of the languages below:
python_programmingPython
scratch_programmingScratch
so for the first mounting:
just plug the BrickPi on to the Pi without any preparations?
extra voltage supplies required?
for a start with Raspbian (Jessie) already running:
(Raspbian installed by NOOBS: user pi, no password)
setup preferences in Linux config files (boot/config.txt? menu->Raspi configuration?) ?
(probably enable SPI, anything else?)
download and install Linux drivers?
for gcc/gpp:
download and install C API libraries :
sudo git clone…? sudo apt install… (.so, .a, .cpp, .c, .hpp., .h, folder <BrickPi>)?
where to copy .h, .hpp, .c, and .cpp files ( /usr/local/include? /usr/local/lib? manually create directories? ) to be accessable from anywhere (/home/pi/…? by #include <BrickPi.h> or anything?)
compile and build flags (-l..., -L..., -I...) ?
gcc 4.9 ok? -std=c11 needed?
for the BrickPi HAT:
how to check the current firmware?
how to update firmware (in case)?
anything else…
before you “hello brickpi world”?
could please someone kindly answer my questions?
I have now ordered my first Brickpi3 and I want to avoid making mistakes at the very first steps in order not to muddle up anything leading to consecutively unrepairable faults or damages!
You can follow the BrickPi3 Getting Started Guide to get the hardware and software set up (there’s also info in there regarding power requirements). On standard Raspbian (or Raspbian for Robots), you can follow the software installation instructions. The install script does all the necessary configuration (enable SPI, install the BrickPi3 python modules, etc.).
For C/C++ while we do now have drivers available, we don’t have a “getting started with C” tutorial. When you install the BrickPi3 software, the C++ drivers and examples are included (they get installed in the directory /home/pi/Dexter/BrickPi3/Software/C). For compiling, see the example compile command in the C examples. To compile the examples for testing, I just put the BrickPi3.h and BrickPi3.cpp files in the same directory as the program I was compiling (e.g. info.c).
To check the firmware version, you can either run the python example “Read_Info.py” or you can compile and run the C program “info.c”.
You’re welcome to not follow the instructions, but I highly recommend that you run the install script. If you don’t want to run the install script, look through it and run all the necessary commands according to what you want. The Python modules are light, and unless you are really concerned with size, I don’t think you need to worry about them being installed.