Go Down

Topic: Is there any way to 'Zoom in'? (Read 352 times) previous topic - next topic

waterlooenders

I'm using code made on another much smaller display and so everything is just within the top right!

https://www.amazon.co.uk/Elegoo-Inches-Screen-Technical-Arduino/dp/B01EUVJYME/ref=sr_1_1?ie=UTF8&qid=1512574316&sr=8-1&keywords=elegoo+tft - screen

I'm then using the elegoo library. The code uses
tft.setCursor(30, 108);
and
tft.fillScreen(25, 71, 80, 65, BLACK);

etc to fill in pixels. Is there any reasonable way to zoom in on the screen or at least move everything to the middle without editing every single tft.setCursor!

artisticforge

I'm using code made on another much smaller display and so everything is just within the top right!

https://www.amazon.co.uk/Elegoo-Inches-Screen-Technical-Arduino/dp/B01EUVJYME/ref=sr_1_1?ie=UTF8&qid=1512574316&sr=8-1&keywords=elegoo+tft - screen

I'm then using the elegoo library. The code uses
tft.setCursor(30, 108);
and
tft.fillScreen(25, 71, 80, 65, BLACK);

etc to fill in pixels. Is there any reasonable way to zoom in on the screen or at least move everything to the middle without editing every single tft.setCursor!
what was the original display?
which Arduino board are you using?

Given that the Elegoo has a stylus I am going to assume that it is a resistance display.

If you have to edit every single tft.setCursor depending on the operating system you are using there are utilities that make it easier.
Under linux there is 'sed' and scripting of 'vim' there is also 'awk'
The same for MacOSX.
I do not do windows so i have no ideas there.



waterlooenders

what was the original display?
which Arduino board are you using?

Given that the Elegoo has a stylus I am going to assume that it is a resistance display.

If you have to edit every single tft.setCursor depending on the operating system you are using there are utilities that make it easier.
Under linux there is 'sed' and scripting of 'vim' there is also 'awk'
The same for MacOSX.
I do not do windows so i have no ideas there.



Original display was Adafruit 1.8" ST7735 based screen with 160x128 resolution.
I'm using a mega.

Yeah it is, I'm not planning on using the touch capabilities for this project though.

If I have to go through is there any way to add/takeaway in the tft.setCursor command. So whenever it's called each point has a certain number added to it?

artisticforge

Original display was Adafruit 1.8" ST7735 based screen with 160x128 resolution.
I'm using a mega.

Yeah it is, I'm not planning on using the touch capabilities for this project though.

If I have to go through is there any way to add/takeaway in the tft.setCursor command. So whenever it's called each point has a certain number added to it?
post your original code so that we may read it.
Also post what the required changes to be made are.

waterlooenders

post your original code so that we may read it.
Also post what the required changes to be made are.

https://github.com/Jcarlsonm31/GameBoy - that's the original code, it's pretty long though.

I'm using a larger screen so I want it either to a. Scale up so it fills the screen or b. goes to the centre rather than the top left.

Thanks

artisticforge

https://github.com/Jcarlsonm31/GameBoy - that's the original code, it's pretty long though.

I'm using a larger screen so I want it either to a. Scale up so it fills the screen or b. goes to the centre rather than the top left.

Thanks
Please use the url tags when posting.

I need to see the Elegoo library code. That is the graphic code you are using.

How have you switched from the original display driver to the Elegoo display driver?

waterlooenders

#6
Dec 06, 2017, 09:01 pm Last Edit: Dec 06, 2017, 09:09 pm by waterlooenders
Please use the url tags when posting.

I need to see the Elegoo library code. That is the graphic code you are using.

How have you switched from the original display driver to the Elegoo display driver?

http://www.elegoo.com/download/ I'm using the libraries from here. To switch I've just changed the libraries it calls on then changed the code so it calls on the correct screen, e.g. by changing the pins.

Do you think either option will be possible at all?

artisticforge

http://www.elegoo.com/download/ I'm using the libraries from here. To switch I've just changed the libraries it calls on then changed the code so it calls on the correct screen, e.g. by changing the pins.

Do you think either option will be possible at all?
I need to see the sketch that you have modified or written to use this display with the Gameboy library.

Also which ELegoo Library are you using?

Go Up