Great!!!! I got my New Propeller BOE :-( now I really am lost
smithdavidp
Posts: 146
I have about 10 hours into figuring this thing out. I have had some progress but I am totally lost as far as how it handles the pin designations. With my BS2, BOE, I understood what, and how, pins are designated. If I want my left servo to work I pluged it into the number 12 header and the name of that servo became P12. All of the examples I am reading like:
CON
_clkmode = xtal1 + pll16x
_xinfreq = 5_000_000
PING_Pin = 0 ' I/O Pin For PING)))
LCD_Pin = 1 ' I/O Pin For LCD
LCD_Baud = 19_200 ' LCD Baud Rate
LCD_Lines = 4 ' Parallax 4X20 Serial LCD (#27979)
leave me confused. My Ping sensor is pluged into the P17 header, the servo to turn the sensor in pluged into P16, the right continous servo is plugged into P15 and the left continouns servo is pluged into P14. Am I to assume that the number that goes after PING_PIN=0 should be changed to PING_PIN=P17? The same with the servo examples SERVO,0 SERVO,1 should be replaced with, in my case, SERVO,P14 SERVO,P15? I don't want to burn somthing up, or out for that matter, due to my lack of knowledge.
I was new to this with the Basic Stamp but the instructions made it easy to follow. There are a great number of examples to follow but few "nuts and bolts" type of pictures. For example "If you plug in your right servo to the Header marked P17 be sure to remember that the BS2 program will use P17 when it activates the Right hand servo. Lets test that now". A picture showing the connector on the P17 header would be shown and then a short routine to test the operation of the servo would be given. I understood that. But saying that Spin is simple to learn or it's easy as cut and paste is beyond me. I'm not following the materials that I downloaded and most of the other materials refer to different animals then the one that I have. The section about controlling multiple lights was great.....but past that there is only examples of code with no schmetics to know where I am going or what I am doing. I saw there is a section comming about using the Propeller BOE on the BOE- BOT chassis. I hope it is as good as the "Robotics with the Boe-Bot" manual that arrived with my Boe-Bot kit.
CON
_clkmode = xtal1 + pll16x
_xinfreq = 5_000_000
PING_Pin = 0 ' I/O Pin For PING)))
LCD_Pin = 1 ' I/O Pin For LCD
LCD_Baud = 19_200 ' LCD Baud Rate
LCD_Lines = 4 ' Parallax 4X20 Serial LCD (#27979)
leave me confused. My Ping sensor is pluged into the P17 header, the servo to turn the sensor in pluged into P16, the right continous servo is plugged into P15 and the left continouns servo is pluged into P14. Am I to assume that the number that goes after PING_PIN=0 should be changed to PING_PIN=P17? The same with the servo examples SERVO,0 SERVO,1 should be replaced with, in my case, SERVO,P14 SERVO,P15? I don't want to burn somthing up, or out for that matter, due to my lack of knowledge.
I was new to this with the Basic Stamp but the instructions made it easy to follow. There are a great number of examples to follow but few "nuts and bolts" type of pictures. For example "If you plug in your right servo to the Header marked P17 be sure to remember that the BS2 program will use P17 when it activates the Right hand servo. Lets test that now". A picture showing the connector on the P17 header would be shown and then a short routine to test the operation of the servo would be given. I understood that. But saying that Spin is simple to learn or it's easy as cut and paste is beyond me. I'm not following the materials that I downloaded and most of the other materials refer to different animals then the one that I have. The section about controlling multiple lights was great.....but past that there is only examples of code with no schmetics to know where I am going or what I am doing. I saw there is a section comming about using the Propeller BOE on the BOE- BOT chassis. I hope it is as good as the "Robotics with the Boe-Bot" manual that arrived with my Boe-Bot kit.
Comments
This is slightly advanced, and I think I have this right, You can also do this..
PING_PIN := P17 := Purple17 := jello9 := 17
But why you would want to name your Ping sensor Pin "jello9" or "Purple17" is beyond me, and is only an example.
-Tommy
The names are for convenience and for documentation. You don't need to use the names, just the numbers, but they sure make things easier to understand. As you said, if your PING sensor is plugged into the socket for I/O pin 17, you'd define a name PING_PIN like:
CON PING_PIN = 17
This assumes that the rest of the example uses the name PING_PIN.
http://learn.parallax.com/PropellerBOE
which gives Spin programming examples and hookups specific to the PropBOE.
You can also use the KickStart guides here:
https://sites.google.com/site/parallaxinretailstores/
The diagrams are for the Propeller QuickStart board, and new pictures showing the PropBOE are coming later this next week. But in the mean time, just ignore the "P" in the labels on the PropBOE. Other slight changes are:
* Anytime it says to connect to Vss plug into a PropBOE Gnd pin
* Anytime it says to connect to Vdd plug into a PropBOE 3.3V pin
* Anytime it says to connect to Vin plug into a PropBOE 5V pin
Bookmark the KickStart page for the updates coming this next week.
-- Gordon
I also really liked "Robotics with the BOE-Bot". I agree, it would be great to see such a book written for the PropBOE.
I posted a couple of programs in the Robot Forum. One program just holds the wheels still to make it easier to calibrate the servos. The other program makes the robot drive forward and then drive backward.
The names aren't so much used for "backtracking" as they're used instead of the numbers in the rest of the program wherever the number would be used.
If this is, indeed, how Spin works then I think I understand what is going on. It seems to me that putting all of the objects in the library directory would be the thing to do. Searching for what you need to complete a project is narrowed down to a single directory. Then copying the objects to a specific directory, that contains your project, is just a simple matter of copy and paste to the new directory.
Thanks for your time.
PUB methods and PRI methods are the same except that the PUB names are available outside the OBJ while the PRI names are PRIvate to the OBJect. A better analogy would be that a PRI tool might be like an adjustment tool needed to install a kit, used nowhere else in the engine.
DAT is used for several things. I don't know what the assembly language analog would be and it's use to hold variables common to several instances of an object might not fit your rebuild analog.
Objects can be kept in the same directory as your main program file and they can be kept in the library directory. Some objects are indeed "library" objects and might / can be used in lots of different programs. Those go in the library directory. Other objects are just used for your program. They are not designed nor intended for use by other programs. Those go in your program's directory. Sometimes these unique objects become more useful generally over time and might, after cleaning up, be suitable to move to the library directory for more widespread use. Sometimes they might be so useful that it might be good to package them up with some documentation and examples of their use and submit them to the Object Exchange for others to use.
I have one of Parallax's nice 3 wire cables with the 3-pin sockets on each end to use to connect the PING to my Prop BOE. I snipped the white lead about an inch from one socket and soldered a 3.3K resistor between the stripped wire ends, then insulated the area with stretchy vinyl electrical tape. Works fine.
There are a lot more choices of sensors now than just a few years ago. Any sensor I recommend would likely be out of date.
I have looked a humidity sensors lately. The SHT11 (IIRC) works pretty well for measuring humidity and temperature.
GPS is kind of tough. I made a GPS logger a while back and all the full featured GPS objects used several more cogs than they needed. In order to save a few cogs, I had to move many of the child objects into the parent object. Hopefully I missed something, but I was disappointed in the GPS choices I had to choose from last summer.
I imagine you've noticed the BOE-Bot has a hard time moving around on anything but a smooth floor. I don't think you need a larger chassis because of the added sensors, but you might what to use a robot with larger wheels and more powerful motors so you can move on carpet and over small obstacles.