This Forum is Dedicated For all The Object Oriented PIC Lovers .......... The concept behind OOPic is straight forward. Use preprogrammed multitasking Objects from a library of highly optimized Objects to do all the work of interacting with the hardware. Then write small scripts in Basic, C, or Java syntax styles to control the Objects. During operation, the Objects run continuously and simultaneously in the background while the scripts run in the foreground telling the objects what to do.

Saturday, January 12, 2008

[oopic] Re: events again

--- In oopic@yahoogroups.com, "dldlhfd" <dldlhfd@...> wrote:
> Hardware wise I have a switch, one side hooked up to 5 volts the
> other side hooked to ground with a 1K resistor.
I would say that the resistor should be on the 5V line to limit the
current, not on the ground line.

> What am I doing wrong?
I am not sure, but your code is working for me with small changes. I
use the OOPic-R board and have a microswitch connected to line 8 with
internal pull-up resistors activated, so I just added this line at the
beginning of main:
ooPIC.PullUp = cvTrue
and changed
sw1.IOLine = 13 to sw1.IOLine = 8
When I press the switch, yellow light blinks 5 times.

Maybe this will be helpful:
http://www.oopic.com/objapp2.htm


--
Mike



Yahoo! Groups Links

<*> To visit your group on the web, go to:

http://groups.yahoo.com/group/oopic/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:

http://groups.yahoo.com/group/oopic/join

(Yahoo! ID required)

<*> To change settings via email:
mailto:oopic-digest@yahoogroups.com
mailto:oopic-fullfeatured@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
oopic-unsubscribe@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:

http://docs.yahoo.com/info/terms/

No comments: