Enough outs?

I am building Yellow Drum Machine, (YDR).

I have set up the basic caterpillar tracks(note how most machines are yellow, it is a law of nature with caterpillar tracks, aparently), and 2 drumsticks. In other words, the usual & basic stuff for an YDR!

And I have lots of plans and ideas for different things it should do.. But I now realize that I may run out of outputs from the board, standard 28pin picaxe board. And I would hate to make it a dual-core project, I am pretty tired of them at the moment, too many wires, 2 chips to program etc, it takes out some of the fun, I am more into keeping it simple in these days.

So I have to plan, which is also not what I usually like to do when building robots for fun. And then I thought that I might as well do it in here instead of opening notepad or similar, getting a blog-entry out of it at the same time :)

Outputs available:

Standard:

  • 0
  • 1
  • 2 Stick 1
  • 3 Stick 2
  • 4 Motor
  • 5 Motor
  • 6 Motor
  • 7 Motor


Many inputs on the Picaxe 28 can be reversed to outputs, this gives me these extra:.. Hmm.. hang on - it depends on the version of the Picaxe 28.. Mine is 28X1 (Options in the programming editor, "firmware").. ok.. X and X1 have same ins and outs..and so I have this extra:

Clipboard10.jpg

  • Out c0 .. No I will need that for input of SRF05 for navigation
  • Out c1
  • Out c2
  • Out c3
  • Out c4
  • Out c5
  • Out c6
  • Out c7

Hmm!! Aparently that leaves me with 9 more outputs, and I still have 4 analouge inputs!

OK, back to just building, ins-and outs are no problem, I can add 9 extra drumsticks, I think that will do!

out and in for the Parallax Ping)))

I was tinkering with this lastnight trying to get my sensor to cooperate with my 28x1. im using pin 11 for both in and out.

you can change pin 11 to be an output pin by using

low portc 0 or
high portc 0

afterwards theres many ways to revert it back to input, i use let dirsc = %00000000 wich sets all the pins back to input. this allows me to use the command PULSIN 0, 0, rawDist

my problem is i cant do a PULSOUT 0, 5 command because it looks at pin 21(Output 0), not Pin 11 . And you cant do this: PULSOUT portc 0, 5 because it just wont compile, parameter 1 only allowed a is a 0-7 integer. Maybe using other commands i can simulate a PULSEOUT? is it just a matter of sending a high signal and adding a pause or something?

 

Ive tried a bunch of commands and all i see is the sensor led blinking on intervals. maybe its lacking the right voltage? it needs 5v and im using 3 AA batteries.

PULSOUT 0, 5 I guess (with

PULSOUT 0, 5

I guess (with the risk of missing a zero or something stupid) this would be the same;

high 0 wait 5 low 0

F.