Hello I have a Question.
I bought the Velleman VM 8090 and I like to use it with my Raspberry Pi under Wheezy Raspian.
I saw the post viewtopic.php?f=3&t=6186
and I can Switch the relay but only in the Toggle mode. So this is useless to me because I don’t now if the relay is on or off. shure I can look on the LED but this isn’t the point.
so I can switch the relay with following commands.
The device /dev/ttyACM0 is meant to be used as a terminal, what you want to do is send raw datastty -F /dev/ttyACM0 19200 raw -echo
printf '\x04\x11\x01\x00\x00\xea\x0f' >>/dev/ttyACM0
printf '\x04\x12\x01\x00\x00\xe9\x0f' >>/dev/ttyACM0Must be executed as root
If you want to receive data, then you’ll have to start using some kind of programming language (C, perl, python, Java, …) that can actually read from the port and parse what comes in.
The function printf is just a string formatting routine, it prints text on the screen. But in your case, you send this piece of text to a serial port instead of the screen.
That said, you can not expect a text function to communicate properly with the K8090, that’s just not how things work
I suggest you look for tutorials on the internet about how to communicate with the serial port under linux. Find a tutorial that you can understand or get to understand gradually.