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.

Sunday, December 23, 2007

[oopic] Re: Help with incoming Serial Communcation from PC to ooPic-R I2c LCD03

I do as you, generally fully specify everything so as to leave myself
clues in case it is a while before I get back to something...

I also tend to trim off irrevalent stuff from the bottoms of long
messages...

--- In oopic@yahoogroups.com, "red71956" <kdwyer@...> wrote:
>
> Is there any reason NOT to use .Value? Does this take more (compiled)
> space than not using it?
> I often use a more verbose mode, heavily commented, especially if I
> may not modify it. Weeks, or months later all the extra comments and
> such makes it easier to remember what it is I was trying to
> accomplish.
>


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/

Saturday, December 22, 2007

[oopic] Re: SRF02 on an OOpic-R

--- In oopic@yahoogroups.com, "Trikky2" <richard@...> wrote:
>
> Hi Richard,
>
> Thanks for the reply.
>
> Yes it is wired uplike that.
>
> Good idea about seeing if I can get the software revision
> from location 0.
>
> I think I'll have to invest in a display ... Should make
> Debugging easier :)
>
> All the best.
>
> Richard

Just grab the low byte and use str$() to convert it to ASCII and send
it out the serial port to the PC using oSerialPort.

Use part of the code for the oSerialPort object.

Somewhere on the menu bar of the IDE, there is a way to get to the
terminal window. The OOPic output will show up there. You may have
to click in the window or hit <Enter> - at least I seem to remember
doing something like that with Ver. 5. I'm not on my WinXP box at the
moment so I can't really test it.

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/

Re: [oopic] Serial Port....Power...OOPIC-R

It does not - You'll have to hack that in yourself, which is a trivial
process, in fact, it is a very neat solution to get power there.

DLC

aravind_2917 wrote:
> hello,
>
> Am planning to buy a serial bluetooth adapter(FireFly,www.sparkfun.com)
> to connect it to the serial port of an oopic-R board.
>
> The specifications of serial bluetooth adapter says that the adapter
> accepts power from PIN 9 OF THE DB serial port if available,or it should
> be powered externally.It requires 5 V DC.
>
> Will this work with oopic?...Does OOPIC supply power on pin 9 of the
> serial port?..Its a problem to power the serial adapter externally..
>
> so,should i go ahead and buy it?
>
> thank you.
>
>
>
> [Non-text portions of this message have been removed]
>
>
>
>
> Yahoo! Groups Links
>
>
>
>

--
------------------------------------------------------
Dennis Clark ooPIC Tech Support
www.oopic.com
------------------------------------------------------


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/

Re: [oopic] Re: SRF02 on an OOpic-R

Hi Richard,

Thanks for the reply.

Yes it is wired uplike that.

Good idea about seeing if I can get the software revision
from location 0.

I think I'll have to invest in a display ... Should make
Debugging easier :)

All the best.

Richard
----- Original Message -----
From: "rtstofer" <rstofer@pacbell.net>
To: <oopic@yahoogroups.com>
Sent: Saturday, December 22, 2007 7:47 PM
Subject: [oopic] Re: SRF02 on an OOpic-R


> --- In oopic@yahoogroups.com, "richard6406" <richard@...> wrote:
>>
>> Hi Folks,
>>
>> Am new here ( and to robotics ) so please bear with me :)
>>
>> I recently got an OOPic-R board and have so far had no problems
> with
>> a few small programs ( switching LED's / buzzing / running servos
> and
>> running a Motor controller ) But I am now trying to connect an
> SRF02
>> Ultasonic range finder ( http://www.robot-
>> electronics.co.uk/htm/srf02techI2C.htm ).
>>
>> The simple program I have is :
>>
>> Dim Sonar As New oI2CM 'Sonar object
>> Dim Servo As New oServo 'Servo object
>> Dim Range As New oByte ' Range variable
>>
>> Sub Main()
>> ooPIC.Delay = 500 ' 5 sec delay before start
>>
>> '~~~~~~~~~~~~ Set Up Sonar~~~~~~~~~~~~~~~~
>> Sonar.Node = 112 ' Decimal of Hex address 0xE0 shifted by 1
>> Sonar.Mode = cv10Bit ' I2C mode as 10-Bit addressing.
>> Sonar.Width = cv8Bit ' 1 byte wide transfer
>> Sonar.NoInc = 1 ' Don't increment
>>
>>
>> '~~~~~~~~~~~~~ Set up Servo ~~~~~~~~~~~~~~~~
>> Servo.IOLine = 31 ' Use line 31
>> Servo.Adjust = 28 ' Center
>> Servo.Operate =cvTrue ' Start servo
>>
>>
>>
>> Do ' Continuous loop
>> Sonar.Location = 0 ' Command register
>> Sonar = 81 ' Set ranging to cm
>> ooPIC.Delay = 7 ' Wait to give sonar time
>> Sonar.Location = 2 ' Just get high Byte
>> Range = Sonar ' Get Range
>> Servo = Range ' Move servo
>> ooPIC.Delay = 50 ' Wait 500ms
>> Loop
>>
>> End Sub
>>
>> Did this just to try and read the high byte and move a servo to
> show
>> I'm getting a signal every half second.
>>
>> When this runs the servo moves slightly forward and back at half
>> second intervals but the sonar does not seem to be firing ( no led
>> blink, only the long blink on power up ).
>>
>> I'm sure this will be the first of many questions :)
>>
>> Wishing you all the best.
>>
>> Richard
>>
>
> Do you have it wired like: http://www.robot-
> electronics.co.uk/htm/srf08oopic-r.htm ? It should be quite similar
> if not identical.
>
> It would be worth reading register 1 to be certain you get 0x80
> back. If not, you aren't communicating.
>
> So, the unit measures to 6 meters or 600 cm. Then 600 cm / 256
> (masking out the low byte) means the upper byte only varies between
> 0 and 2. That won't make much of a movement.
>
> Richard
>
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>


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/

[oopic] Re: Serial Port....Power...OOPIC-R

--- In oopic@yahoogroups.com, "aravind_2917" <aravind_2917@...> wrote:
>
>
> hello,
>
> Am planning to buy a serial bluetooth adapter(FireFly,www.sparkfun.com)
> to connect it to the serial port of an oopic-R board.
>
> The specifications of serial bluetooth adapter says that the adapter
> accepts power from PIN 9 OF THE DB serial port if available,or it should
> be powered externally.It requires 5 V DC.
>
> Will this work with oopic?...Does OOPIC supply power on pin 9 of the
> serial port?..Its a problem to power the serial adapter externally..
>
> so,should i go ahead and buy it?
>
> thank you.
>

From the schematics (www.oopic.com -> Manual -> Connectors and
Mechanical -> click on R-board -> Schematics) you can see that pin 9
is jumpered to pin 8. Kind of strange...

This jumper could cause you a lot of trouble even if you use an
external power supply to plug in to the adapter. You will be
back-feeding pin 8 with a high voltage and the adapter might not like it.

If you wish, you could make a short adapter cable that didn't carry
pin 9 to the female of the cable adpater. This would allow you to use
a power supply at the bluetooth gadget or connect it to the female of
the cable adapter. Carry only pins 2,3 and 5 from the OOPic (more
below...).

You are also going to have to deal with RTS/CTS. The OOPic doesn't
provide these signals. In the adapter cable you build, jump pins 7 &
8 at the end where the dongle plugs in (female). See the last
paragraph of Page 7 (PDF page 2).

The OOPic doesn't handle serial IO very well. You could try to
implement flow control with the IOLineF property of oSerialPort. You
would need to level shift the IOLine (MAYBE a transistor and resistor)
connecting to pin 8 (remove jumper from pin 7) of the female end.

Then there is the issue of level shifters in general: the OOPic R
doesn't provide true RS-232 levels. There is a remote possibility
that the dongle won't like 0V and 5V levels. I don't think it will be
a problem but it might.

All of this leads to my conclusion that the S-board is a better way to
go. I can easily add a level shifter that produces ALL of the signals
and all at the proper voltages
http://www.pololu.com/products/pololu/0126/

It's also true that I
MUST add a level shifter, nothing is included.

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/

[oopic] Serial Port....Power...OOPIC-R

hello,

Am planning to buy a serial bluetooth adapter(FireFly,www.sparkfun.com)
to connect it to the serial port of an oopic-R board.

The specifications of serial bluetooth adapter says that the adapter
accepts power from PIN 9 OF THE DB serial port if available,or it should
be powered externally.It requires 5 V DC.

Will this work with oopic?...Does OOPIC supply power on pin 9 of the
serial port?..Its a problem to power the serial adapter externally..

so,should i go ahead and buy it?

thank you.

[Non-text portions of this message have been removed]


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/

[oopic] Re: SRF02 on an OOpic-R

--- In oopic@yahoogroups.com, "richard6406" <richard@...> wrote:
>
> Hi Folks,
>
> Am new here ( and to robotics ) so please bear with me :)
>
> I recently got an OOPic-R board and have so far had no problems
with
> a few small programs ( switching LED's / buzzing / running servos
and
> running a Motor controller ) But I am now trying to connect an
SRF02
> Ultasonic range finder ( http://www.robot-
> electronics.co.uk/htm/srf02techI2C.htm ).
>
> The simple program I have is :
>
> Dim Sonar As New oI2CM 'Sonar object
> Dim Servo As New oServo 'Servo object
> Dim Range As New oByte ' Range variable
>
> Sub Main()
> ooPIC.Delay = 500 ' 5 sec delay before start
>
> '~~~~~~~~~~~~ Set Up Sonar~~~~~~~~~~~~~~~~
> Sonar.Node = 112 ' Decimal of Hex address 0xE0 shifted by 1
> Sonar.Mode = cv10Bit ' I2C mode as 10-Bit addressing.
> Sonar.Width = cv8Bit ' 1 byte wide transfer
> Sonar.NoInc = 1 ' Don't increment
>
>
> '~~~~~~~~~~~~~ Set up Servo ~~~~~~~~~~~~~~~~
> Servo.IOLine = 31 ' Use line 31
> Servo.Adjust = 28 ' Center
> Servo.Operate =cvTrue ' Start servo
>
>
>
> Do ' Continuous loop
> Sonar.Location = 0 ' Command register
> Sonar = 81 ' Set ranging to cm
> ooPIC.Delay = 7 ' Wait to give sonar time
> Sonar.Location = 2 ' Just get high Byte
> Range = Sonar ' Get Range
> Servo = Range ' Move servo
> ooPIC.Delay = 50 ' Wait 500ms
> Loop
>
> End Sub
>
> Did this just to try and read the high byte and move a servo to
show
> I'm getting a signal every half second.
>
> When this runs the servo moves slightly forward and back at half
> second intervals but the sonar does not seem to be firing ( no led
> blink, only the long blink on power up ).
>
> I'm sure this will be the first of many questions :)
>
> Wishing you all the best.
>
> Richard
>

Do you have it wired like: http://www.robot-
electronics.co.uk/htm/srf08oopic-r.htm ? It should be quite similar
if not identical.

It would be worth reading register 1 to be certain you get 0x80
back. If not, you aren't communicating.

So, the unit measures to 6 meters or 600 cm. Then 600 cm / 256
(masking out the low byte) means the upper byte only varies between
0 and 2. That won't make much of a movement.

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/