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.

Thursday, July 24, 2008

[oopic] Re: OOPIC C1+ Firmware

--- In oopic@yahoogroups.com, "calpolyjdk" <calpolyjdk@...> wrote:
>
> BTW...below is the basic code that I've been trying to get to work for
> the past few days:
>
> -------------------------------------------------
> Dim Vex As New oRCIN6
> Dim Ch1_Link As oBus
> Dim Servo1 As New oServo
>
> Sub Main()
> ooPIC.Delay = 5000
>
> Vex.Operate = 1
> Servo1.IOLine = 8
> Servo1.Operate = 1
>
> 'Servo/Channel 1
> Ch1_Link.Input.Link(Vex.Ch1.Value)
> Ch1_Link.Output.Link(Servo1.Position.Value)
> Ch1_Link.Operate = 1
>
> End Sub
> -------------------------------------------------
>
> I've even used the Object Watcher found in the Files section (great
> and useful tool!) to look at the values of Vex.Ch1.Value, and it
> always is 0. Because it is, the Servo will move to an extremity
> because it is expecting 0 to 63. Moving the stick for Ch. 1 on the
> transmitter, though, does nothing to change that value, leading me to
> believe that the incoming multiplexed servo line from the Vex is not
> being properly parsed.
>
> FYI...
>
> Jonathan

This is one of those situations where only a scope can help. You need
to SEE what the input looks like. You also need to see if the signal
is INVERTED or some other screwy thing. Debugging this stuff without
a scope is hopeless.

I often try some of these small snippets but, in this case, the object
is specific to C.1 and I don't have a device.

Like I suggested, run an oServo output into the oRCIN1 input and see
if it works. There is every likelihood that pulse polarity will not
be a problem.

You could also implement the example code and watch the output on some
LEDs or even convert the value to a string and transmit it out the
serial port.

But try it first with a single pulse using oRCIN1.

Richard

------------------------------------

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: