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.

Monday, September 10, 2007

[oopic] Re: strange oLED operation, VB.net commands to SCP

--- In oopic@yahoogroups.com, "dan" <dan_ruggirello@...> wrote:
>


I don't understand why people mess with SCP when all you have to do
is write a simple ASCII interface for the oopic. Which is easier,
trying to decipher this "\0V42J144H36L03N", or this oopic code, by
way of example ...

====================
Do
' process incoming keypresses
if (com1.received=1) then
key = com1.value
' convert small to capital
if (key > 97) then key = key - 32

if (key=ch_S) then
call stop ' "S"
call play1
end if

if (key=ch_F) then call forward ' "F"
if (key=ch_A) then call accel ' "A"
if (key=ch_D) then call decel ' "D"
if (key=ch_B) then call backup ' "B"

if (key=ch_H) then call half ' "H"
if (key=ch_L) then call turn_left ' "L"
if (key=ch_R) then call turn_right ' "R"
if (key=ch_K) then call brake ' "K"
call report
end if

Loop
=========================

The original file is here ...

http://www.oricomtech.com/projects/rolandp.htm#Soft2
http://www.oricomtech.com/download/jp1-1.txt


- dan michaels
www.oricomtech.com
--- OOBOT40 Boards ---
===========================


> am gonna answer my own question since i figured it out ;)
>
> i recorded the state of the 4 bytes of memory for an "off"
condition
> and "on" condition and based this observation was writing the upper
4
> bits for address 42 and 43. the oLED documentation indicates i
> should only be changing bit 7 from address 42 to toggle the LED.
>
>
> --- In oopic@yahoogroups.com, "dan" <dan_ruggirello@> wrote:
> >
> > I have a OBOT40-II+ board with B.2.2+ firmware connected to a pc
> via
> > serial cable. I built a simple GUI interface in VB.net to toggle
> an
> > LED on and off. There are 4 bytes at address 41-44 that control
> the
> > oLED. I am sending write commands to the upper 4 bits of 42 and
43
> to
> > control the LED as follows:
> >
> > to turn LED off:
> > upper 4 bits at address 42: 0011
> > upper 4 bits at address 43: 0000
> > scp command:
> > \0V42J144H36L03N
> > \0V43J144H36L00N
> >
> > to turn LED on:
> > upper 4 bits at address 42: 1111
> > upper 4 bits at address 43: 0010
> > scp command:
> > \0V42J144H36L0FN
> > \0V43J144H36L02N
> >
> > The serial port is set to 9600,N,8,1.
> >
> > The oLED object is set up to operate at a brightness of "1".
Every
> so
> > often when toggling the LED to the "off" state, the LED goes to
the
> > brightest level instead of turning off. While in this state, i
> checked
> > the memory at 42 and 43, and it shows it correctly as off.
> Subsequent
> > toggles, and the LED operates as expected until it occurs again.
> > Anyone have an idea why this may be occuring?
> >
> > Thanks,
> > dan
> >
>



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: