Thank you for answering. I see what you have posted but in that code there are used also other functions (e.g. begin, setSpeed, beginTransmission) of Arduino libraries (wire.h, spark_wiring_i2c.h, spark_wiring.h, spark_wiring_usbserial.h). How can I replace those?
Tommaso Vescovo
@Tommaso Vescovo
Best posts made by Tommaso Vescovo
Latest posts made by Tommaso Vescovo
-
RE: I2C comunication with MCP9600 Thermocouple Sensor
-
I2C comunication with MCP9600 Thermocouple Sensor
Hi everyone!
I have to use the MCP9600 Thermocuple Sesnor to monitor a temperature. This sensor comunicates with I2C protocol.
As can be seen in the datasheet (http://ww1.microchip.com/downloads/en/DeviceDoc/20005426C.pdf, from page 15 onwards), to catch the value you have to follow a sequence of instructions but I do not understand how to replicate them in a C program using the C libraries of Onion Omega (onion-i2c.h). Would anyone be able to help me? -
RE: Using bluetooth with gcc
In this days I tried cross-compile both with VM Ubuntu and with Docker Toolbox but I wasn't able to include bluetooth library. Does anyone know how to do it?
For the test, I used this example:
http://people.csail.mit.edu/albert/bluez-intro/c404.htmlEdit: I found in Docker the bluez-lib and they run well but work in that conteiner is laborious (I have to use transfer.sh website to transfer files). Where can I found the Makefile to compile bluez-lib in the LEDE Configurator in order to use it in Ubuntu too?
-
RE: Using bluetooth with gcc
@Douglas-Kryder, I'm aware of this but that's not the problem. The error occurs before the cross-compilation, namely when I start, on the computer, the configuration to create the toolchain for the cross-compilation.
-
RE: Using bluetooth with gcc
Thank you Arek Z for answering. I've followed the guide for setting up the cross compilation toolochain on kubuntu (using virtual machine) and I tried to use it. I managed to cross-compile and then run on the Onion2 both simple programms (e.g. "hello world") and the "c-cross-compile-example" which required to install/import gpio library.
So I follow the same procedure for bluez-libs but, when I run the make command to compile again the toolchain, this error occours (to see it I run "make V=s"):Do you know how I can resolve it?
-
Using bluetooth with gcc
Hi everyone!
For a project, I have to develop a simple C/C++ programm, which uses bluetooth, on a Onion Omega2 where I installed gcc compiler. To use bluetooth, I tried to install the bluetooth library "BlueZ" (downloaded from www.bluez.org) following the guide included in the package but with no positive result. In fact, the "configure" step returns several errors of missing library/packages (eg. librt, glib, udev, d-bus, d-bus, ...) which however are actually present in the device.
Was anyone else in the same situation? In this case, did you resolve the problem? If yes, how did you fix it? Or did you find an alternative way?Thanks in advance for your answers.