On 12 June 2012 16:10, Joachim Franek <joachim.fra...@pibf.de> wrote:

> 1. USB
> Assume I attach a spi device to ftdixxxx and
> have a userspace non rt program which
> can read/write to the device.
> What do you suggest to exchange data with hal
> for not really time critical data (like this case
> of temperature control of the extruder head)?

If you can get it into Python, then it is fairly easy to create and
write to HAL pins from Python
If you prefer to use C then you can write userspace components in the
comp preprocessing language which keeps things relatively simple.

> 2. Eth
> Assume I attach a spi device to a Rasperry Pi
> because the cable length is a bit longer and
> development is much more comfortable. Here runs
> a program as a server which opens a tcp or udp port.
> How to communicate with this program (with sockets)
> and transfer some data to hal?

Again, Python is fairly easy. (import hal)
But you could probably do it with a bash script and nc.
Set up a udp listener and halcmd setp when the value changes.

-- 
atp
If you can't fix it, you don't own it.
http://www.ifixit.com/Manifesto

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to