[C.CC USERS] Wiring.module errors
Laurence Laycock
rencio7 at gmail.com
Fri Aug 6 21:14:58 BST 2010
Yes...well I'm trying to convert some robot code over to concurrency from
arduino not much done so far....
here is the concurrency code so far although I had to make changes to
wiring.module to get it to compile...
as in I had to delete a whole chunk of code from it lol...
here is the robot code so far (H-bridge)
I couldn't get it to work with plumbing.module unfortunately....
*#INCLUDE "wiring.module"*
*
*
*VAL INT motor1Pin IS 3:*
*VAL INT motor2Pin IS 4:*
*VAL INT enablePin IS 9:*
*VAL INT motor1Pin2 IS 5:*
*VAL INT motor2Pin2 IS 6:*
*VAL INT enablePin2 IS 10:*
*
*
*PROC pinSetup ()*
* SEQ*
* digital.mode (motor1Pin, OUTPUT)*
* digital.mode (motor2Pin, OUTPUT)*
* digital.mode (enablePin, OUTPUT)*
* *
* digital.mode (motor1Pin2, OUTPUT)*
* digital.mode (motor2Pin2, OUTPUT)*
* digital.mode (enablePin2, OUTPUT)*
* *
* digital.write (enablePin, HIGH)*
* digital.write (enablePin2, HIGH)*
*:*
*
*
*PROC goForward()*
* SEQ*
* digital.write (motor1Pin, LOW)*
* digital.write (motor2Pin, HIGH)*
* digital.write (motor1Pin2, HIGH)*
* digital.write (motor2Pin2, LOW)*
*:*
*
*
*PROC main ()*
* SEQ*
* pinSetup ()*
* goForward()*
*:*
*
*
Here is the chunk I deleted from wiring.module to get it to work
*INT FUNCTION analogReference (VAL INT type)*
* VALOF*
* IF*
* type = DEFAULT*
* ADC.REF := DEFAULT*
* type = INTERNAL*
* ADC.REF := INTERNAL*
* type = EXTERNAL*
* ADC.REF := EXTERNAL*
* TRUE*
* die ("Analog processes do not support this type.")*
* RESULT type*
*:*
*
*
any one else having problems ?
I guess that a lot of stuff isn't complete yet....;)
Laurence (:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.concurrency.cc/pipermail/users/attachments/20100806/1f50fb81/attachment.htm>
More information about the users
mailing list