API DOCUMENTATION
Documentation is updated from time to time. Be sure to clear your browser cache so that you get the latest version.
The latest API documentation can be found on line at:
https://docs.zymbit.com/
Documentation is updated from time to time. Be sure to clear your browser cache so that you get the latest version.
The latest API documentation can be found on line at:
https://docs.zymbit.com/
Hi, I finally received my zymkey 4i and it looks great!
I have a few question, I just tried to start to play to my zymkey:
I am interested to use C code. I look your API and tried to include ā/home/zymbit/zk_app_utils/zk_app_utils.hā but I couldnāt find any zymkey user in /home !!
I finally was able to compile my C script with including <zymkey/zymkey.h> in my headers but got these error lines:
zymbit.c:(.text+0x18): undefined reference to āzkOpenā
zymbit.c:(.text+0x2c): undefined reference to āzkLEDFlashā
zymbit.c:(.text+0x34): undefined reference to āzkCloseā
Could you help me and tell me what I missed??
Thx by advance!
Hi
I can play fine the python module, but I still canāt use the C API.
Could you help me? Is there something I should link to my gcc line?
Thx by advance
@Tgratier sorry for the late response. The include files for C/C++ are located in /usr/include/zymkey. You can directly include this path in your C code #include "/usr/include/zymkey/zk_app_utils.h"
. Or, you could #include <zk_app_utils.h>
and put the path on the gcc include line:
gcc -I /usr/include/zymkey my_zymkey_program.c -o my_zymkey_program
The reason that you donāt see a user directory for user zymbit in /home (/home/zymbit) is that the account is deliberately created in the systemd service with no /home directory for security.
Please let us know if you have further questions.
Hi
Thx for your help.
I am sorry but it didnāt change anything, I have the same āundefined reference toā errors than with
#include <zymkey/zk_app_utils.h>
You say the C/C++ files can be found in /usr/include/zymkey, but I only have these 3 files:
I guess my code canāt find the code declaration of the functions I am calling. Where could I find the c code for these? donāt they should be in the same /usr/include/zymkey folder? If the answer is yes, could you help me to find what have I missed during my installation please?
Thx
@Tgratier
You will also need to reference the Zymkey App Utilities, located at /usr/lib/libzk_app_utils.so, with the -l
directive. For example:
gcc -I /usr/include/zymkey -lzk_app_utils my_zymkey_program.c -o my_zymkey_program
Ok thx that was the thing I missed.
Hi (itās me again ĀÆ_(ć)_/ĀÆ )
I just did a new clean install on a raspberry, but I suddenly have a segfault error just after these two lines:
zkCTX *ctx;
zkOpen(*ctx);
The compilation works fine with the previous help you told me above.
I am working on jessie distrib, and I enabled the I2C device, and the blue light of the zymbit is blinking every 3s.z
BTW The two python examples you gave are working fine.
Could you help me (again) to find what I forgot?
and I have the same results with two different zymkey 4i modules and different raspberry and SD cards :-/
You need to declare the Zymkey context plainly and then pass in the pointer to the context:
zkCTX ctx;
zkOpen(&ctx);
Ok my badā¦ thx again
No problem. Happy to help
Hi, I have the same problem. I tried your solutions (path included in my C code or in the gcc command), but I cannot compile my code.
Please help me.