On 02/07/17 10:43, Sag ich Dir nich wrote:
now it loads the machine but also says: init_serialport: Unable to open port : No such file or directory. I think it is because i have not connected the Arduino is it? As far as i can see, all Pins are outputs, can i set them to input via config-pin or do i have to change the file and compile again?

The arduino has to be connected, with the .ino script flashed to it and running AND the port must be correct

The serialreceive.comp has the port defined as
#define DEVICE "/dev/ttyACM0"

That was correct for the type of arduino I used, but others will use /dev/ttyUSB0 etc

You need to program your arduino with the counterpart script, note the port it appears on and change serialreceive.comp to match,
then recompile that.

THEN you hopefully get somewhere :)

anyways thank you

Am Sonntag, 2. Juli 2017 11:24:06 UTC+2 schrieb Schooner:

On 01/07/17 19:20, Sag ich Dir nich wrote:
> Hello,
>
> i tried to compile a file to use an Arduino Mega as io expansion
> (https://forum.linuxcnc.org/18-computer/23166-arduino-i-o-with-linuxcnc?limitstart=0)
> but it does not seem to compile the file.

Thought it sounded familiar.

I wrote that 5 or more years ago, just to demonstrate passing a bunch of
pin values Arduino / HAL component
It does not really do much and would need changing for the specifics of
whatever you want to do.

>
> i do
>
> cd /home/machinekit/Desktop
>
> sudo comp --install serialreceive.comp
>
> <SNIP>
>
> so i added "loadrt serialreceive" to my hal file and when i start my
> machine it gives me an error:

It is a userspace component, use loadusr

>
>
> CRAMPS.hal:23: insmod failed, returned -1:
> do_load_cmd: dlopen: serialreceive.so: cannot open shared object file:
> No such file or directory

There is no serialreceive.so, it is an ELF binary userspace file, so it
will be in /usr/bin.

Needs to be loaded with `loadusr -W serialreceive` from a suitable point
near the end of your hal file.


--
website: http://www.machinekit.io blog: http://blog.machinekit.io github: https://github.com/machinekit
---
You received this message because you are subscribed to the Google Groups "Machinekit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
Visit this group at https://groups.google.com/group/machinekit.
For more options, visit https://groups.google.com/d/optout.

--
website: http://www.machinekit.io blog: http://blog.machinekit.io github: https://github.com/machinekit
---
You received this message because you are subscribed to the Google Groups "Machinekit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
Visit this group at https://groups.google.com/group/machinekit.
For more options, visit https://groups.google.com/d/optout.

Reply via email to