SO IVE GOT A COUPLE OF SENSORS capslock sorry... and it seems the best way to learn how to use them starting with the pir sensor is to look at the basic stamp programming then I found this podcast http://pastebin.com/bGsm2K2u which has both spin and C code. I have not found the wiring yet but I guess I will, its near midnight so im not searching again. there are only 3 pins plus some with jumperts on more of them. my pPIR sensor was less than 3 dollars it has two yellow screw adjusters for sensitivity and distance, I have read on another site that one poster said only one out of 3 he purchased worked properly, well I only bought the 1, so I hope it works. its hard to resist a sensor that was actually under 3 bucks and no postage, I also have a couple of adc chips arrive so I can do the extra experiments on both the prop and the r-pi. and also I do have a stepper motor so I will be using that and the servos over the weekend,
I am very happy with C for the prop. but Erco, if your listening, I can learn a lot buy getting my scribbler out of the cupboard !
Whiteoxe, for sensor FIRST try Microcontroller Kickstarts in Learn (Spin), then look in Obex, and then try Simple Devices and Simple Protocols under Propeller C of learn. If the device doesn't use something like SPI or I2C then you can ask for help in locating code.
Here is the link for Microcontroller Kickstarts - Unfortunately it hasn't been updated with newer products but it's a start. http://learn.parallax.com/KickStart
If you to the Learn website you will see Microcontroller Kickstarts in the lower left corner. I know for a fact that there is code for the Parallax PIR sensor there.
Genetic....I could go back to Spin. Its not as though I have invested so much time in C that I could have regrets of any real substance.. I've got even a good book on Spin as well I think from parallax. that was an excellent link thank you. . If you truly believe id be better off to go back and learn spin properly to the best of my ability before moving on to C then that is what I will do. There is a chance as little things come back to me I could well even enjoy it. So is this how you think I should navigate my way back into this world of programming and electronics ???
On the subject of C documentation for Propeller: we have a key person (Jeff Martin) who is responsible for filling in what's missing. This is taking us some time to achieve but it's in process.
hi ken, I understand that. you know I thought I was pretty ok at spin even doing some bit banging on occasion and getting good at reading it well. it just looks like assembly to code to me, not pretty . but I think Genetix knows me well enough to steer me a bit.
BTY, Ken, how is the retailing of parallax going in Australia. ? Too soon to ask ? I checked out one of the online biggies in Australia that seem to have every part you could want, but though they have no postage charge , just to give you an example of how they have priced their range of Parallax products, a single prop chip from them is over $30, but it only takes 48hours delivery
that was RS Components. thewy cant be real distributors of yours can they ?, they are not nearly that outrageous with other items ive bought from them , two adc chips cost me close to $10.,, arrived in about 24 hours.
in so far as robotics go if you have ping and PIR sensors does that mean IR distance sensors are of little use, seeing as the ping is more accurate. Only wondering as there is no spin code for the IRsensors in the kickstarts link ? Of course I have it in the bs2 scribbler library in different forms such as AVOID OR MOTION FOLLOW, MOTION ALARM.
On the subject of C documentation for Propeller: we have a key person (Jeff Martin) who is responsible for filling in what's missing. This is taking us some time to achieve but it's in process.
The PIR isn't for robots but for detecting an object such as in an automatic light. The PIR has a very wide field of view.
Robots use IR and Ultrasonic to detect objects and measure distance. Those sensors are basically line-of-sight or they see whatever is directly in from of them.
I think Spin is easier to understand if you are going to use the Propeller but since you also play with the Arduino and others then C may be the way to go. To harness the full power of the Propeller though requires Propeller Assembly which shares some commands with Spin.
C is recent to the Propeller so code for many items doesn't exist yet but there should be Spin code in Obex or the Forums.
Comments
I am very happy with C for the prop. but Erco, if your listening, I can learn a lot buy getting my scribbler out of the cupboard !
Here is the link for Microcontroller Kickstarts - Unfortunately it hasn't been updated with newer products but it's a start.
http://learn.parallax.com/KickStart
If you to the Learn website you will see Microcontroller Kickstarts in the lower left corner. I know for a fact that there is code for the Parallax PIR sensor there.
BTY, Ken, how is the retailing of parallax going in Australia. ? Too soon to ask ? I checked out one of the online biggies in Australia that seem to have every part you could want, but though they have no postage charge , just to give you an example of how they have priced their range of Parallax products, a single prop chip from them is over $30, but it only takes 48hours delivery
that was RS Components. thewy cant be real distributors of yours can they ?, they are not nearly that outrageous with other items ive bought from them , two adc chips cost me close to $10.,, arrived in about 24 hours.
Robots use IR and Ultrasonic to detect objects and measure distance. Those sensors are basically line-of-sight or they see whatever is directly in from of them.
I think Spin is easier to understand if you are going to use the Propeller but since you also play with the Arduino and others then C may be the way to go. To harness the full power of the Propeller though requires Propeller Assembly which shares some commands with Spin.
C is recent to the Propeller so code for many items doesn't exist yet but there should be Spin code in Obex or the Forums.