Forum

Button through rs232

Hi,
So I am trying to use button as an input to 4v via rs232:

http://jimmi.zoto.com/img/original/f02d9ce766976dad7ec7d4ce4fc3d775-.jpg

I connected button to 6th ant 4th COM port pins:

http://jimmi.zoto.com/img/original/3285b5715f0a072e49ec4c0fb92e4740-.jpg

What changes am I to see in the RS232 Node when I press the button? Did I miss something?

Thanks for any help,
jim

hi jim,

What changes am I to see in the RS232 Node when I press the button? Did I miss something?

my question: what Baudrate are you pressing the knob to generate data?


if i wanted to connect a single button to a pc i either would use the GamePort or connect an old serial mouse to the ComPort and only use one button.

regards
@kalle

or get a arduino board which lets u connect at least 13 buttons and with a bit of effort even more …

www.arduino.cc

hey kalle,

what Baudrate are you pressing the knob to generate data?

have no idea how to answer this question…
on the other side of the knob there are some numbers, maybe they tell sth: DS-412 3A 125V AC JAPAN :) ?

knob is connected to DTR (4) and DSR (6) pins

All i want is 4v to print “1” when i press the knob.

I am not sure if this is going to work, but if you can see a BANG from the middle pin (on data) off the RS232 node, you are on a good lead.
(connect a counter or something to see if something is happening)

Others Q’s: Are you sure it is COMport1? Are you sure you used the correct colors?

DS-412 Model
3A Max power
125V Max Current
AC Altering Current
JAPAN Country made in

Stil I would use an old mouse, way easier…, or something like an old game-controller, more buttons, or an Arduino, even more buttons!!

Are you sure it is COMport1? Are you sure you used the correct colors?

i am pretty sure cables and colors are okay, at least these guys told me to do this:
[ link: sci.electronics.basics]( link: sci.electronics.basics)
i checked cables 4th pin is yellow 6th is blue, so i connected beasts…
but i wasn’t sure about com port number, so i tried all 32 :), however it doesn’t work. Probably i’ll try old mouse, arduino is not worth buying because of one knob (i need only one). But if someone has an idea about rs232 knob issue, would be great to hear some tips.

update: i don’t know what i’ve done, but after i cut serial cable, to make color wires longer (for easier tweaking)

http://jimmi.zoto.com/img/original/49929fc97417d2666d837cefc5d456b4-.jpg
i’ve found some changes in the patch - counter grabbed 16 changes, and output pin gave me beta sign :) !

i cant believe it works !!! i press this pussy knob and see changes in 4v wow!! :)

btw. what does this ÿÿÿ output means?

…so i connected red and yellow cables

yellow is 4th pin – DTR (Outgoing handshaking signal)
and red is 2nd pin – RD (Incoming Data from a DCE)

i’m curious if other cables will make any signal in vvvv…
…if I won’t write about further progress in 5 minutes – it means i’ve been burned my motherboard :)))

thanks a lot
later

…so i tried all in+out pins combination, and got these work for me:
red + orange = makes On Data output to 1 forever (kinda Toggle)
red + yellow = makes On Data to 1 once (kinda Bang)

orange is 3 output pin (Transmitted Data (TD) Outgoing Data to a DCE)

Oke, congrats :) That is one simple way to make a button to work in vvvv!!!

The ÿÿÿ and beta sign are ASCII code, but I think you would be more interested in the value it represents, so connect a Ord (string) to it.

I think you want to stick with the ‘on data’ pin to introduce the button in vvvv. If you connect a TogEdge (animation) between the counter, does one press represent one count??

If not, we need to think about another way to make it work ;)

edit: you want more than 1 button now?? ;)

check.v4p (8.5 kB)

thx West!

does one press represent one count??

no :’’’-(

may i ask why??

ok. i see there are some misunderstandings on how a serial ports works going on:

http://en.wikipedia.org/wiki/Asynchronous_serial_communication
http://en.wikipedia.org/wiki/Serial_port

what jimmi is trying to accomplish is using the DTR (4) and DSR (6) pins of the RS232 port to read switches. this is basically a hack which is not a part of the RS232 specification. these lines are meant to check if a telephone line of a modem is ready, or if the communication between pc and device somehow break down. nobody uses these lines for that purposes anymore, and it is quite a good idea to use these lines for connecting switches, but unfortunately vvvv´s RS232 node will not return the current status of these lines – it will just return the data which gets received according to the RS232 spec.

as it was demonstrated it is actually possible to get at least some behaviour when wiggeling these line, but i consider the
returned ÿÿÿ character more like the static noise used to be seen on tv channels late at night, as some interpretable data. the characters received will change with different baud rates, and may also vary with different rs232 hardware or cables.

anyway, if it works, thats cool, and i am not in the position to say it doesnt work, but i would rather suggest dismantling an old gamepad or mouse to get a much more reliable data input.