|
Re: I2C/SPI Support [message #1756281 is a reply to message #1756223] |
Tue, 14 March 2017 21:47 |
|
Hi,
What you can do as starting point is to define your own SIFBs whith which you read the values of the ADXL345. Inside of this FB you could make use of the SPI class which is implemented in the conmeleon module. This class gives you a very convenient access to SPI. The only thing would you should note is to not activate the full conmellon module but just reference the needed SPI class from your module. You can have a look in the PiFace module for reference.
The next point is that typically you need to read and write registerd of the SPI device. This now depends on the operation mode and offerings of your chip and which modes you would like to use.
I hope this helps you for getting started.
|
|
|
|
|
|
|
|
|
Re: I2C/SPI Support [message #1763663 is a reply to message #1763652] |
Thu, 18 May 2017 12:32 |
|
thanks for pointing this out. Unfortunately your corrections are not fully in line with FORTE classes. Instead of chaging it to #include <thread> it should be #include <forte_thread.h>. The reason is that forte has its own thread abstraction which works also on platforms where the c++11 thread is not supported. Also it is a little bit more lightweighted.
|
|
|
Powered by
FUDForum. Page generated in 0.04324 seconds