Lexy the Sexy Hexy

Hexapod Robots

Re: Lexy the Sexy Hexy

Postby Matt Denton » Tue Sep 22, 2009 1:48 pm

Yup, probably the execution speed differential, If you tweak the code, please post your results. The Hardware serial IO would be the best option by far though :)
Matt Denton
AKA: Winchy_Matt

micromagic systems ltd
Matt Denton
Site Admin
 
Posts: 1622
Joined: Tue May 20, 2008 9:15 pm
Location: Winchester UK

Re: Lexy the Sexy Hexy

Postby RiverRatDC » Tue Sep 22, 2009 1:58 pm

Matt Denton wrote:Yup, probably the execution speed differential, If you tweak the code, please post your results. The Hardware serial IO would be the best option by far though :)

Will do!
Kevin

+--------------------------------------------------------+
|"Backward compatibility isn't what it used to be..."|
+--------------------------------------------------------+
RiverRatDC
 
Posts: 12
Joined: Fri Aug 07, 2009 10:10 pm
Location: Washington, DC

Re: Lexy the Sexy Hexy

Postby plingboot » Mon Sep 28, 2009 10:32 am

RRDC - love the clip of your hex' running the ultra sonic code and thanks for porting this to Basic Atom. ;) My programming skills are not upto that kind of thing, but now your code is available i'll be putting the BB2 back onto my hex.

One quick question about the various 'project' additions to the hexapod.

If i have/will have the following connected/running:
• the wireless PS2 connection
• ultrasonic sensor
• blob tracking via bluetooth connection to host computer

What would be an 'elegant' way of switching between, say, blob tracking and ultra sonic avoidance, or more probably ultra sonic avoidance and PS2 control? ie: friends come round and ask about the hex on the shelf. I show them a bit of PS2 control, then just let the hex continue on it's own - wandering around avoiding things…
Sheriff of Nothing
plingboot
 
Posts: 281
Joined: Sun Jun 01, 2008 5:30 pm
Location: the gutter, fashionable south west london

Re: Lexy the Sexy Hexy

Postby RiverRatDC » Tue Sep 29, 2009 4:26 pm

plingboot wrote:
What would be an 'elegant' way of switching between, say, blob tracking and ultra sonic avoidance, or more probably ultra sonic avoidance and PS2 control? ie: friends come round and ask about the hex on the shelf. I show them a bit of PS2 control, then just let the hex continue on it's own - wandering around avoiding things…


plingboot,

On Lexy, the ATOM & BB2 carrying it have their own power switch. I usually show her off by first powering up just the HexEngine and putting her through her wireless PS2 paces. When finished with that, I just flip the switch on the BB2 to automatically run whatever program is stored in the BS2P or ATOM installed in the BB2 at the time. Incidentally, the HexEngine is capable of continuing to receive and act on PS2 commands while the HexEngine also acts on PIP commands received over the TTL serial port from the ATOM. You can use the PS2 controller to change gaits or leg transition speeds, etc. while the robot wanders around running the obstacle avoidance code.

If the goal is to be able to switch between multiple, different programs stored on the ATOM, then a simple thing would be to just program the buttons on the BB2 to select different blocks of code and hence, different tasks. A Bluetooth connection to the BB2-ATOM could be used to do this all remotely. It's limited only by your imagination and coding skills. The HexEngine-SMB and the BB2-ATOM, each with Bluetooth connectivity, are a very flexible and powerful platform for a number of different forms of development.

I can't stop thinking of things I want to try! But, work and family continue to budget my robot efforts. So much robot, so little time :(
Kevin

+--------------------------------------------------------+
|"Backward compatibility isn't what it used to be..."|
+--------------------------------------------------------+
RiverRatDC
 
Posts: 12
Joined: Fri Aug 07, 2009 10:10 pm
Location: Washington, DC

Re: Lexy the Sexy Hexy

Postby plingboot » Sat Oct 24, 2009 10:53 am

Hi Kevin,
VERY basic question here - not fiddled with my hex' for a long while and everything i'd previously learned (which wasn't that much) seems to have evaporated from my brain…

So, but just wondered whether i need to change anything in your ATOMPro code in order to use an SRF08 sensor - i'm guessing there's no code to take advantage of the SRF08's light sensor either - is this an issue?

Also my AtomPro is a 24 rather than a 28 - i'm guessing this shouldn't make any difference to things?

Finally - could you let me know which jumpers you used on the BB2?

--

i found your thoughts on using bluetooth with both the BB2 and HexEngine - particularly interesting - since i've got a spare blueSmirf from my original phoenix hex, but my coding skills are so basic, i think it'll be awhile before i figure out how to implement such a system. :oops:
Sheriff of Nothing
plingboot
 
Posts: 281
Joined: Sun Jun 01, 2008 5:30 pm
Location: the gutter, fashionable south west london

Re: Lexy the Sexy Hexy

Postby plingboot » Mon Oct 26, 2009 11:26 am

Had chance to fiddle with the SRF08 and AtomPro version of the avoidance project this weekend.

To be honest i didn't have time to spend ages on it and i did get somewhat frustrated at having to use the Thinkpad - (why does everything take 'at least' twice as long to do on a PC compared to the Mac?)

Installed the latest version of the BasicMicro Studio app. I 'thought' i might be able to run this in XP via parallels on my mac, but it refused to see the AtomPro via the USB/serial convertor, so had to be done on the ThinkPad.

I 'assume' the app could see the AtomPro (BAP) on the BB2, because once i'd loaded the code and clicked programme, it seemed to build (tokenize?) and appear to transfer to the BAP and once i cycled power to the Hex, buttons A and B on the BB2 were illuminated and the BB2 'chimed' on start-up.

I checked the config setting in the HexEngine and they match those in the app notes.

On cycling power the red led on SRF08 flashed on once, but didn't continue to flash.

I woke the hex with the PS2 controller, the avoidance code didn't appear to start running, I pressed reset on the BB2, but nothing, I tried both BB2 buttons, but again nothing. :(

I'll post up with my connections between the SRF08 and BB2, SMB later. But in 99% sure they're ok.

I 'think' the jumpers on the BB2 are correct, but will post these too, just incase anyone can make some helpful observations.

Is there a way to see whether the BAP is running the code, via the Basic Micro Studio app?
Sheriff of Nothing
plingboot
 
Posts: 281
Joined: Sun Jun 01, 2008 5:30 pm
Location: the gutter, fashionable south west london

Re: Lexy the Sexy Hexy

Postby RiverRatDC » Tue Oct 27, 2009 6:06 pm

Hey Plingboot,

The ATOM code which utilizes the SRF04 will not work with the SRF08. The two ultrasonic sensors use different protocols and commands, and are not interchangeable. I don't have an SRF08, so can't offer assistance in writing I2C ATOM-compatible code for it. You are also correct that the SRF04 lacks the light sensor present on the SRF08, so that code has been removed from the program.

I connected the BB2 and SMB using pins 14 and 15 of the ATOM/BB2 for serial comms. This is different than the pinout used in the original obstacle avoidance tutorial. The comments at the beginning of the ATOM code clearly indicate what pins need to be interconnected. The code should work just as well on an ATOM-24 as it does on the ATOMPro-28 and should have turn rates similar to the original BS2P tutorial. The ATOM-24 and BS2P both run at 12000 instructions per second.

When the program is run, even with the sensor code not working on the SRF08, your Hex should still wakeup and begin to walk on its own if the BB2 and SMB are properly connected, and the Bluetooth module jumper is removed from the SMB (JP1-2, if you have the ESD200). This tells me you likely have connection issues between the BB2 and SMB.

Good Luck.
Kevin

+--------------------------------------------------------+
|"Backward compatibility isn't what it used to be..."|
+--------------------------------------------------------+
RiverRatDC
 
Posts: 12
Joined: Fri Aug 07, 2009 10:10 pm
Location: Washington, DC

Re: Lexy the Sexy Hexy

Postby plingboot » Wed Oct 28, 2009 9:50 am

Hi Kevin,
Thanks for the reply.
I've just invested in an SRF04. ;)

For whatever reason i need to see connection layouts visually, so I've attached a revised version of my original SRF/PS2 diagram which 'i think' matches the description of connections in your code.

Would you mind having a look over it to confirm or point out errors - connections and/or jumpers ?

I've marked the jumpers i think are required and two options for power to the SRF04.

Thanks, David

---
Image
Sheriff of Nothing
plingboot
 
Posts: 281
Joined: Sun Jun 01, 2008 5:30 pm
Location: the gutter, fashionable south west london

Re: Lexy the Sexy Hexy

Postby RiverRatDC » Wed Oct 28, 2009 8:00 pm

David,

The connections you show for the SRF04 and between the BB2 & SMB look correct. I'm powering the SRF04 from the BB2 I/O bus.

I do see a couple of issues, though:

On the BB2, your 9V battery should be plugged into VS, not VL, in order to use it as a single voltage supply for the ATOM and any sensors or servos. Leave the VS_VL jumper in place as your diagram shows it.

Set all five VS_5V jumpers on the I/O bus to 5V so you don't run the risk of accidentally sending 9 volts to any sensors or devices connected to the P0-P15 I/O bus power rail that can't tolerate it.

Also, make sure there is no jumper on the 'ATT' pins which connects Button C/Yellow LED of the BB2 to P14 of the ATOM. We're using P14 on the I/O bus as our serial in from the HexEngine. P12, P13, and P14 of the ATOM are shared between the buttons/LEDs and the I/O bus pins of the BB2, determined by the 'DAT', 'CMD', and 'ATT' jumpers.

Finally, if you have the ESD200 Bluetooth module connected to the pBrain-SMB, make sure you remove jumper JP1-2 from the SMB to free up the UART1 RX for use by the ATOM/BB2. Also, make sure you remove CN-18 JP2, if it is installed, so the HexEngine configuration terminal is on the UART2 RS232 serial port and not the UART1 TTL serial port.

Good Luck.
Kevin

+--------------------------------------------------------+
|"Backward compatibility isn't what it used to be..."|
+--------------------------------------------------------+
RiverRatDC
 
Posts: 12
Joined: Fri Aug 07, 2009 10:10 pm
Location: Washington, DC

Re: Lexy the Sexy Hexy

Postby plingboot » Thu Oct 29, 2009 10:15 am

Kevin,
I've updated the diagram to take in your feedback. The Jumpers on my BB2 are as they are in the diagram - no more, no less.
Not updated the jumpers on the SMB part of the diagram yet - BB2 is on my desk, hexapod isn't.

Was hoping to have the SRF04 here today, but 3 days of bloody postal strikes mean it'll probably not be here until mid next week. :x
Thanks again for your input - looking forward to getting this working on my hexapod… ;)
David
Sheriff of Nothing
plingboot
 
Posts: 281
Joined: Sun Jun 01, 2008 5:30 pm
Location: the gutter, fashionable south west london

PreviousNext

Return to Hexapods

Who is online

Users browsing this forum: No registered users and 1 guest

cron