3x3x3 led cube

ajcgkm

New Member
I decided as a first project to tackle the 3x3x3 led cube. I had a look on youtube but I think there was only one done with a picaxe all the others were pic chips. The code is fairly basic with around 13 routines. Each loop of the main program calls a random routine and displays it. I have only been learning this language for about 2 weeks so be easy on me

its available to look at on youtube here is the link

http://www.youtube.com/watch?v=1wwQ31OpC94
 

eclectic

Moderator
Welcome to the Forum

An excellent first project.

Can you post the schematics and program,
so that others can benefit?

e
 

ajcgkm

New Member
the plans

yes here are plans feel free to mod if you want.

The schematic is a drawing and easier to follow so have fun and if you improve on my code let me know I can use it on mine :p

AJ LED CUBE SCHEMATIC.jpg


Sorry code was to long to post and I couldnt attach it either so if you want it give us your email and I will post to you. I did try to attach it but could not
 

eclectic

Moderator
There ae sections of your code which do not pass Syntax for an 18M2.

For example

Code:
fade:
 for b8 =1 to 255 step 1 '** To speed up change to 2 to 15 **
  pwm pinsb,b8,1 '** LED 0 on first, 1 to 255 back to 1 **
  'pause 3 '** To slowdown insert pause 1 to 10 here **
 next b8
 
 for b8=225 to 1 step -1'** To speed up change to 2 to 15 **
  pwm pinsb,b8,1
  'pause 3 ** To slowdown insert pause 1 to 10 here **
 next b8

e
 

nick12ab

Senior Member
Entire code passes syntax check for me.

I don't understand why pinsB is used as the pin for PWM
Code:
pwm pinsb,b8,1
The code will mean that the pin used for pwm depends on the value of pinsB - remember that few pins can do PWM.
 

eclectic

Moderator
I stand corrected.

In my earlier post, I was using a PE 5.40 computer, which gave the Syntax error.

Moving to v. 5.5 show no syntax error, and the Manual (7.8) also
shows pwm available on the 18M2.

e
 

ajcgkm

New Member
nick12ab that fade section of code was from some other program snippet that was kindly posted by another member on this forum. I have been using this language for 2 weeks and the manual is not very informative so I am still learning via experimenting. Why pinsB? well it worked and that was all I needed. There may be another way but until I learn some more this will have to do.
 
Top