Page 1 of 1

PostPosted: Mon Jun 17, 2002 12:49 am
by Todd Z
If you complete the circuit by connecting the right pins, you can make hardware react to the event() function (returns 15), but is it as easy to make the palm complete the circuit internally? Like the alarm vibrator, is it easy to make the circuit complete by programming?

PostPosted: Mon Jun 17, 2002 1:08 am
by artosoft
Plsease explain more...

Do you mean that if you can do:
connector --> palm program,

You want to do:
palm program --> connector?

--> means "control"

Best regards, Dian Suharto.

PostPosted: Mon Jun 17, 2002 1:25 am
by Todd Z
I have already been able to control my program though hardware, I want my program to control the hardware.

PostPosted: Mon Jun 17, 2002 4:04 am
by artosoft
Use serial port.

In my tiny vibrator, I fake serial port to trigger the motor.
Some people has written a hack to fake this serial port: when the alarm happend, it will send "something/anything" to serial port. And the circuit connected to serial port will see it as a trigger to turn on the motor.
This also can be simulated by PocketC. If I send something to serial port, it will trigger the motor.

This is not a good solution, since it will only control 1 device (On/Off), but enough for my tiny vibrator project.
If I need to control complex device, I will use serial port as an input and output. It is not easy if you have no experience before.

Best regards, Dian Suharto.

PostPosted: Mon Jun 17, 2002 5:26 pm
by Todd Z
If it is only on/off, do I need to open the serial port? Or do I just do sersend()?

PostPosted: Mon Jun 17, 2002 11:16 pm
by artosoft
Here some example from my old code for turn on/off tiny vibrator:

seropen(300, "8N1C", 50);
sersend("a");//try this, sometimes no need to use sersend();
sleep(5000);//turn ON for 5 second
serclose();//turn OFF

Best regards, Dian Suharto.

PostPosted: Tue Jun 18, 2002 9:21 am
by Todd Z
Thanx. That was very helpful. ~ Todd

PostPosted: Wed May 17, 2006 3:11 am
by bbtapb
Is there any way in PocketC to turn on/off the CTS and/or DTR pins?