Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3368: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3370: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3371: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3372: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
OrbWorks Community Forum • View topic - Completing a ciriuit for hardware.

Completing a ciriuit for hardware.

Discuss PocketC for Palm OS (including Desktop Edition)

Postby Todd Z on Mon Jun 17, 2002 12:49 am

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?
Todd Z
 
Posts: 186
Joined: Sun May 26, 2002 12:51 pm

Postby artosoft on Mon Jun 17, 2002 1:08 am

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.
artosoft
 
Posts: 207
Joined: Sat Dec 09, 2000 12:57 am
Location: Indonesia

Postby Todd Z on Mon Jun 17, 2002 1:25 am

I have already been able to control my program though hardware, I want my program to control the hardware.
Todd Z
 
Posts: 186
Joined: Sun May 26, 2002 12:51 pm

Postby artosoft on Mon Jun 17, 2002 4:04 am

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.
artosoft
 
Posts: 207
Joined: Sat Dec 09, 2000 12:57 am
Location: Indonesia

Postby Todd Z on Mon Jun 17, 2002 5:26 pm

If it is only on/off, do I need to open the serial port? Or do I just do sersend()?
Todd Z
 
Posts: 186
Joined: Sun May 26, 2002 12:51 pm

Postby artosoft on Mon Jun 17, 2002 11:16 pm

Here some example from my old code for turn on/off tiny vibrator:

main(){
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.
artosoft
 
Posts: 207
Joined: Sat Dec 09, 2000 12:57 am
Location: Indonesia

Postby Todd Z on Tue Jun 18, 2002 9:21 am

Thanx. That was very helpful. ~ Todd
Todd Z
 
Posts: 186
Joined: Sun May 26, 2002 12:51 pm

Postby bbtapb on Wed May 17, 2006 3:11 am

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


Return to PocketC for Palm OS

Who is online

Users browsing this forum: No registered users and 5 guests

cron