Splitting a command into multiple line?

Janne

Senior Member
Hi,

Recently i stumbled into problems with using large lookup tables. The goal was to load a 128x64pixel bitmap image into a lookup table, and then with the help of "random" command build the image pixel by pixel to the screen.

1st; it would be nice if it was possible to split a long command (like the lookup) to multiple lines, so that not all the values would need to be on the same line. I guess this could be achieved just with an update to the programming editor?

2nd; Support for bigger tables, the "lookup" command seems to work up to 255 but not beyond that. So if the support for larger lookup tables would not be too hard, mayby that could be possibly added to future firmwares of picaxes? Of course it is possible to split tasks like this to a multiple of smaller tables, but still..

Any thoughts about the usefulness of these possible new features?
 

westaust55

Moderator
No you cannot split the commands as you would like but that said,

Could you use the CASE statement to select which of several LOOKUP commands you enter ? :confused:

Can you keep the data in an external EEPROM and use math to generate a pointer to the location within EEPROM ? :confused:
- something like EEPROM address = x + y*maxX

Is your bit map an image (akin to say jpeg) that you are trying to transfer to a gLCD module ? :confused:

Some more details on exactly what you are trying to achieve would be helpful.

Wile many go directly to LOOKUP and EEPROM I have had success in many instances with using math formula if it comes down to drawing things like lines and circles on a gLCD.
Have a look at this thread where I used a gLCD out of a mobile phone:
http://www.picaxeforum.co.uk/showthread.php?t=10014&highlight=siemens
 
Last edited:

Janne

Senior Member
Hi,

The idea behind this project was to have an image recognization game. there would be a 128x64 pixel GLCD, and the image would be printed at the screen pixel by pixel at a random order.

I already have a piece of software, that can convert a 128x64 1-bit colored bitmap image in .bmp format into a string of 1024 hexadecimal values, which can then be copy-pasted into the picaxe programming editor. The contraption works, as long as I limit the lookup table to 256 values, so in this case I had to have 4 of them.

The idea of using an external eeprom actually sounds quite useful, as the flash memory space even in the x1/x2 range picaxes limits the available images to only 3.. And as i'm using the GLCD with the serial firmware "shield", i have to wait at least 30ms between write commands, so the time it would take to read the data from an external EEPROM is not an issue.
 

Technical

Technical Support
Staff member
The programming editor already has a line wrap option (View>Options>Editor menu) that allows you to view a very long line on multiple lines.
 
Top