Newbie questions
I bought the BoeBot kit last week and so far it has been a fantastic introduction to robotics. I'm an experienced software developer but I did not have any experience in combining it with hardware. So it didn't took me long to learn the PBASIC language. However I learned a lot about prototyping circuits, and the book was really helpful and the Ping))) sensor works fantastic!
I still do have got a couple of questions which I'd like your comment on:
1. The breadboard on the Boe seems rather small which makes it hard to add a lot of sensors/led's/etc... Is there an easy way to extend the Boe breadboard with a larger one?
2. In the PBASIC language if you need to store over 256 bytes, your only option is to use a WORD (or an array of BYTE). Is there no other type between the BYTE(256) and WORD(65536)? The WORD type might reserve a lot of memory I won't use, and the BYTE is too small. I've never had to deal with these kind of memory issues when declaring variables, so your help is appreciated.
3. The BASIC stamp does not provide a lot of memory and does not support multithreading. For example: i'd like to have my boe bot scan the area while driving at the same time. So it seems I'm in need of a new microcontroller which does support that, but it probably won't fit on the Boe. Am I right?
Thanks in advance for your help!
I still do have got a couple of questions which I'd like your comment on:
1. The breadboard on the Boe seems rather small which makes it hard to add a lot of sensors/led's/etc... Is there an easy way to extend the Boe breadboard with a larger one?
2. In the PBASIC language if you need to store over 256 bytes, your only option is to use a WORD (or an array of BYTE). Is there no other type between the BYTE(256) and WORD(65536)? The WORD type might reserve a lot of memory I won't use, and the BYTE is too small. I've never had to deal with these kind of memory issues when declaring variables, so your help is appreciated.
3. The BASIC stamp does not provide a lot of memory and does not support multithreading. For example: i'd like to have my boe bot scan the area while driving at the same time. So it seems I'm in need of a new microcontroller which does support that, but it probably won't fit on the Boe. Am I right?
Thanks in advance for your help!
Comments
With respect to memory, you're kind of stuck with multiples of byte, so, yes, you might waste some space. Keep in mind, most of the funcations are also using byte or word sized arguments and results, so even if you went to the trouble of using an alternate lenght for a given variable, you'd probably loose more space in programming to put and pull the data than you saved in storage.
There are multiple versions of the Stamp with different amounts of memory, etc., and looking at other options there might be a first step.
Given the concern for memory and multi-threading, I'd say you might want to look at the Parallax Propeller. It is an 8 core multi-processor chip, and carries the same Parallax support community. There are number of choices in getting started with the Prop, namely the Prop Demo Board, Prop Education Kits, Prop Prototype Boards, Pro Development Board, Prop Robot Board and a plethora of 3rd Party Boards and modules.
There are folks who have mounted one of the prop boards on the BOE Bot. It would be a great transition, and one I would highly recommend.
John R.
http://forums.parallaxinc.com/forums/default.aspx?f=21&m=175444
Depending on what you need, you can "pack" 5 bit values (0-31), 7bit values, etc. into Words and Bytes -- just make sure you mask appropriately. In the above, I used a single expression, so that the Stamp moves the variables into its "internal" workspace. It might be clearer to set up a "work" variable to see what's really happening:
A Propeller has been suggested for this (which is a great suggestion), but it shouldn't be necessary. There have been many, many robots built which do things like you are asking about with a single core processor (there aren't exactly a lot of multi-core microprocessors out there).
You can do quite a bit inside a loop continuously running on your robot - spending a little time checking different sensors, a little time changing motor parameters, etc. Remember that these loops can run pretty quickly (there isn't any operating system overhead cluttering things up).
You should be able to find numerous examples and there should be plenty of people here who can help. I expect that the Parallax documentation should cover it as well (although I haven't checked).
So, you should be able to continue with the hardware you have (no need to wait for new stuff to arrive ).
At the expense of codespace, remember. Certainly doing as much as you can in a single "expression" will cut down on codespace requirements, albeit with a slight loss of clarity.
I have used the SpinStamp with great success in a BOE-BOT. As Mike said the SpinStamp fits right in the BS2 socket on the BOE board. You will also need to buy the PropClip to be able to program it. Need to remember to us a 1k ohm resistor when connecting a pin to a 5v source, like a Ping sensor. Links and a picture of my SpinStamp BOE-BOT are below.
Tony
SpinStamp http://www.parallax.com/StoreSearchResults/tabid/768/List/0/SortField/4/ProductID/448/Default.aspx?txtSearch=spin+stamp
PropClip - sorry Parallax's website went down just As I went to get this link.
This is exactly what I was looking for, a picture of a working propeller chip on the boe board. Thanks, it looks great
@John:
Has anyone ever done this with the BoE? I'm still unsure how to do this.
What I would do is take a piece of 1/4 plywood or MDF(Medium Density Fiberboard) and cut it to match the size of the BOE and then drill for the four corner mounting holes. Then use four stand offs(like the ones that are used under the BOE) and mount the plywood/MDF plate above the BOE on the four stand offs. You may have to cut the heads off some 4-40 bolts to make short pieces of threaded rod to go between the bottom stand offs, BOE and upper stand offs. Then mount the plywood/MDF plate to the top of the stand offs and the larger bread board to the plywood/MDF. Then all you will need to do is run jumper wires from the pins you want to use to the bread board. I would have made one up to show you but my BOE-BOT is packed in the car ready to go to UPNE. If you have trouble don't hesitate to post your questions.
Tony
Thanks!
Tony