8x8x8 cube programming
Re: 8x8x8 cube programming
That's a very good idea! The only thing is as part of plans to simplify the cubes design, and as nobody seems to be using the spare digital pins for anything, we were considering using them to directly drive the M5456 transistor array. This would then remove the need for the 3 to 8 line decoder altogether. I will make a note of it anyway as it's worth considering.
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.
Re: 8x8x8 cube programming
Decisions, decisions !
I think it a shame that more people don't program the cube but I can understand why and I don't recall seeing any queries here about it. In fact I suspect that quite a few people never finish building the cube as it is a daunting and tedious job to put together the LED slices, the PCB being easy in comparison and your proposed change will only remove the need to solder one socket and a row of pins. Whilst I am sure that you want to reduce the BoM cost I suspect that a few pins, one socket and one IC will make that much difference to the cost
For anyone interested in using the spare pins for something, Bluetooth control comes to mind, it would be a shame not to have the ability to add it but I can't remember now whether I knew that spare pins were available when I bought the kit having previously built the 4x4x4 cube
How important is the ability to control the foot LEDs to most people ? You could free up another pin by providing a jumper to turn the feet permanently on or off. Equally, as practically nobody programs the cube I think that you could remove the ICSP header which may make the MOSI pin available for alternative uses
As I said, decisions, decisions !
Good luck with the changes whatever you decide
If you need a beta tester then you know how to contact me
I think it a shame that more people don't program the cube but I can understand why and I don't recall seeing any queries here about it. In fact I suspect that quite a few people never finish building the cube as it is a daunting and tedious job to put together the LED slices, the PCB being easy in comparison and your proposed change will only remove the need to solder one socket and a row of pins. Whilst I am sure that you want to reduce the BoM cost I suspect that a few pins, one socket and one IC will make that much difference to the cost
For anyone interested in using the spare pins for something, Bluetooth control comes to mind, it would be a shame not to have the ability to add it but I can't remember now whether I knew that spare pins were available when I bought the kit having previously built the 4x4x4 cube
How important is the ability to control the foot LEDs to most people ? You could free up another pin by providing a jumper to turn the feet permanently on or off. Equally, as practically nobody programs the cube I think that you could remove the ICSP header which may make the MOSI pin available for alternative uses
As I said, decisions, decisions !
Good luck with the changes whatever you decide
If you need a beta tester then you know how to contact me
Re: 8x8x8 cube programming
Well an update to the design isn't going to happen for quite a while anyway. What with the current Covid situation we've had to concentrate on just getting orders shipped out and so our (very long) queue of projects has been put on the back burner a bit. The 4x4x4 cube kit is planned to be updated before the 8x8x8 kit anyway.
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.
Re: 8x8x8 cube programming
Understood - good luck going forward
Re: 8x8x8 cube programming
I have a query about the _Diff() function
I looked at how the function worked whilst trying to track down a problem with a program that I had written not behaving as it should. The problem turned out to be that if the difference between the two numbers sent to _Diff() is 0 then it actually returns 1 instead and this is expressly coded in the function
Do you know the reason for this ?
Removing the offending lines appears not to have any deleterious effect on the Line() function which is what I was using when I discovered the problem, but the _Diff() function is used elsewhere in the library and I have not checked any other functions
I looked at how the function worked whilst trying to track down a problem with a program that I had written not behaving as it should. The problem turned out to be that if the difference between the two numbers sent to _Diff() is 0 then it actually returns 1 instead and this is expressly coded in the function
Code: Select all
if(result == 0)
result = 1;
Removing the offending lines appears not to have any deleterious effect on the Line() function which is what I was using when I discovered the problem, but the _Diff() function is used elsewhere in the library and I have not checked any other functions
Re: 8x8x8 cube programming
It's to stop the possibility of a divide by zero error when calculating the step sizes. Although, I can see that it is making a test in the line function pointless so i'll take a look at it as soon as I get chance. If you have an example of how the line function is not working correctly I can take a look at it too.
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.
Re: 8x8x8 cube programming
To see the problem tryIf you have an example of how the line function is not working correctly I can take a look at it too.
- Line (0, 0, 0, 0, 0, 0);
Re: 8x8x8 cube programming
For completeness, here is the function where the problem arose
As you will guess, the LineOff() function turns the line off and is a direct copy of the library Line() function with SetVoxel() replaced by ClearVoxel()
- void diagonalWipe(unsigned long speed)
- {
- for (int c = 0; c < 8; c++)
- {
- for (int b = 0; b < 8; b++)
- {
- Line(c, b, 0, 0, b, c);
- }
- delay(speed);
- for (int b = 0; b < 8; b++)
- {
- LineOff(c, b, 0, 0, b, c);
- }
- }
- for (int c = 1; c < 8; c++)
- {
- for (int b = 0; b < 8; b++)
- {
- Line(c, b, 7, 7, b, c);
- }
- delay(speed);
- for (int b = 0; b < 8; b++)
- {
- LineOff(c, b, 7, 7, b, c);
- }
- }
- }
Re: 8x8x8 cube programming
Thanks. I can see the problem and it should be a quick fix. I'll post an update tomorrow as soon as I get chance to check it works.
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.
Re: 8x8x8 cube programming
There is no rush from my point of view. Currently I am just experimenting with different patterns to see how effective they are, hence the diagonal wipe