Arduino I/O with Linuxcnc
I am trying use your code, but I can not compile it:
cnc@LinuxCNC:/usr/share/linuxcnc/src/hal/components$ halcompile --compile serialreceive.comp gcc -I/usr/include -I/usr/include/linuxcnc -URTAPI -U__MODULE__ -DULAPI -Os -o serialreceive /tmp/tmpT2HXKd/serialreceive.c -Wl,-rpath,/lib -L/lib -llinuxcnchal /tmp/tmpT2HXKd/serialreceive.c: In function ‘__comp_parse_count’: /tmp/tmpT2HXKd/serialreceive.c:79:13: error: ‘count’ undeclared (first use in this function) count = strtoul(&argv[i], NULL, 0); ^~~~~ /tmp/tmpT2HXKd/serialreceive.c:79:13: note: each undeclared identifier is reported only once for each function it appears in /tmp/tmpT2HXKd/serialreceive.c: In function ‘__comp_parse_names’: /tmp/tmpT2HXKd/serialreceive.c:106:17: error: ‘names’ undeclared (first use in this function) names[j] = strtok(p, ","); ^~~~~ Makefile:2: návod pro cíl „serialreceive“ selhal make: *** [serialreceive] Chyba 1
Could you help me somebody please? I am programmer beginner.
File Attachment:File Name: serialreceive.c
File Size:7 KB
File Attachment:File Name: serialreceive.comp
File Size:3 KB
I think this is a compiler problem that is not related to hal or linuxCNC.
If anybody has any suggestions, I would like to hear them.
You do not have to worry
I hope there are no problems caused by removing that line.
Source: Mex: forum.strojirenstvi.cz/viewtopic.php?t=3...ingleton+yes#p384233
Singleton means that only one component can run. Otherwise, it is generally possible to load components in multiple instances.
The singleton then has no instance number in the signal name, because it is the only one possible.
So a normal component has eg serialreceive.0.bit-14,
singleton should eg serialreceive.bit-14.