Would
someone Please help me with the input string needed for
the owcapiexample program. I am trying to read my 18b20 sensors that are
attached to my Raspberry Pi 3 using the I2C interface. I can read
them with my browser @ “localhost:2121”. The problem is I can
not get the example code that was loaded at
(/usr/share/doc/libowfs-dev/examples/owcapi/C) to work. I need help
figuring out what parameters to pass to ./owcapiexample ??? ????
I
have spent countless hours at this. Please help. Thanks Brian
------------------------------------------------------------------------------ Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today. http://sdm.link/xeonphi _______________________________________________ Owfs-developers mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/owfs-developers |
Am 13.01.2017 um 18:23 schrieb bdrmachine:
> Wouldsomeone Please help me with the input string needed forthe > owcapiexample program. I am trying to read my 18b20 sensors that > areattached to my Raspberry Pi 3 using the I2C interface. I can > readthem with my browser @ “localhost:2121”. The problem is I cannot > get the example code that was loaded > at(/usr/share/doc/libowfs-dev/examples/owcapi/C) to work. I need > helpfiguring out what parameters to pass to ./owcapiexample ??? ???? > Ihave spent countless hours at this. Please help. ThanksBrian > Please understand this very simple test program first: === Makefile ======================================================================== .PHONY: all clean CFLAGS=-I /opt/owfs/include/ LDFLAGS=-L /opt/owfs/lib64/ -lowcapi all: owcapitest clean: -rm *.o owcapitest owcapitest: owcapitest.o $(CC) $(LDFLAGS) -o $@ $^ === owcapitest.c ==================================================================== #include <stdio.h> #include <stdlib.h> #include <owcapi.h> int main(int argc, char* argv[]) { size_t rs; char *buf; ssize_t rss; if ((rss = OW_init("-s localhost:4304")) < 0) { perror("OW_init failed"); exit(EXIT_FAILURE); } if ((rs = OW_get("/uncached/10.AE9C54020800/temperature", &buf, &rs)) < 0) { perror("OW_get failed"); exit(EXIT_FAILURE); } printf("%s\n",buf); } ===================================================================================== Kind regards Jan ------------------------------------------------------------------------------ Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today. http://sdm.link/xeonphi _______________________________________________ Owfs-developers mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/owfs-developers |
Am 13.01.2017 um 23:34 schrieb bdrmachine:
> > Okay I give up. I thought there was a simple way to add parameters > to that code to learn how to use C. > Um, it was giving exactly *two* OWFS specific calls, which are pretty understandable. What's the problem? > I have code that work in python > but that is not what I like to use. This learning curve is taking > more time than I have. For some reason your code won't compile. > If you'd show me the log, I could tell you why. If you don't like python and have problems setting up you C compiling environment, why don't use one of the numerous *other* language bindings? Ow the owshell tools? Kind regards Jan ------------------------------------------------------------------------------ Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today. http://sdm.link/xeonphi _______________________________________________ Owfs-developers mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/owfs-developers |
Free forum by Nabble | Edit this page |