November 21, 2024, 09:34:31 PM

News:

Got VSA?  Want to use your Prop-SX?  Now you can!  See the VSA section of the Library forum for Prop-SX code that works with VSA.


Question about prop-1 coding

Started by Clad In Shadows, January 21, 2015, 05:27:06 PM

Previous topic - Next topic

Clad In Shadows

I have a code that was written for Arduino and was wondering if that code could be used for the prop-1 controller also ?
I put the code in attachment for you guys to check .
Thanks.

bsnut

QuoteI have a code that was written for Arduino and was wondering if that code could be used for the prop-1 controller also ?
But, your C code will not work since the Prop-1 (Basic Stamp 1) is coded in PBasic. We can take the order of operations from the C code and coded it to work for the Prop-1.

From what I noticed that the I/O count will work on  the Prop-1, since the Prop-1 only has 8 and you are only using 6. 

One thing to noticed in the C code for the Arduino, you are showing floating point math. The Prop-1 (Basic Stamp 1) isn't able to do this type of math. The Basic Stamp 1 is only able to do whole numbers.

Another, thing that I noticed was that you are wanting to look at analog sensors. This can be done by connecting your sensor to the header pins using a 0.1 cap to ground.   
William Stefan
The Basic Stamp Nut

livinlowe

Quote from: bsnut on January 22, 2015, 02:47:03 AM
QuoteI have a code that was written for Arduino and was wondering if that code could be used for the prop-1 controller also ?
But, your C code will not work since the Prop-1 (Basic Stamp 1) is coded in PBasic. We can take the order of operations from the C code and coded it to work for the Prop-1.

From what I noticed that the I/O count will work on  the Prop-1, since the Prop-1 only has 8 and you are only using 6. 

One thing to noticed in the C code for the Arduino, you are showing floating point math. The Prop-1 (Basic Stamp 1) isn't able to do this type of math. The Basic Stamp 1 is only able to do whole numbers.

Another, thing that I noticed was that you are wanting to look at analog sensors. This can be done by connecting your sensor to the header pins using a 0.1 cap to ground.   
William, correct me if I am wrong but I don't think the prop-1 can do Analog to Digital conversions without and additional chip. I could be wrong.
Shawn
Scaring someone with a prop you built -- priceless!

JonnyMac

January 22, 2015, 09:25:22 AM #3 Last Edit: January 22, 2015, 09:28:05 AM by JonnyMac
The Arduino is built with an Atmel processor that came out several years after the PIC that is used on the Prop-1 -- you won't be able to port many Arduino projects back to the Prop-1. The Amtel chip used includes peripherals/features not on the BS1's PIC (e.g., UART, ADC, interrupts); use of these features limits what would be compatible on a Prop-1.


QuoteWilliam, correct me if I am wrong but I don't think the prop-1 can do Analog to Digital conversions without and additional chip. I could be wrong.

POT is a form of analog-to-digital conversion, but is not suitable for all sensors.
Jon McPhalen
EFX-TEK Hollywood Office

Clad In Shadows

Thanks for the replies.
As you can see , I don't know anything about code .
I just happen to have a couple of prop-1 controllers that I'm not using at the moment and thought it would be worth asking .

Thanks again.