View previous topic :: View next topic |
Author |
Message |
MichaelB.
Joined: 04 May 2017 Posts: 58
|
Posted: Sun Apr 07, 2019 2:12 pm Post subject: Picture Rotate |
|
|
Is there any Command to rotate ,for a 128x64 KS108 Display, a .Bfg file 90 degrees to left oder right or even 180 degrees?
(BASCOM-AVR version : 2.0.8.1 ) |
|
Back to top |
|
|
Duval JP
Joined: 22 Jun 2004 Posts: 1161 Location: France
|
Posted: Mon Apr 08, 2019 9:47 am Post subject: |
|
|
I followed the threads of discussions on the KS108, and I wonder if it is really necessary to use this old display.
On the market, at very low prices, you have color displays (touch or not) with very rich libraries allowing the rotation of images and or texts.
In the forum "Share your work" you have many examples.
JP _________________ pleasure to learn, to teach, to create |
|
Back to top |
|
|
MichaelB.
Joined: 04 May 2017 Posts: 58
|
Posted: Thu Apr 11, 2019 6:48 pm Post subject: |
|
|
Duval JP wrote: | I followed the threads of discussions on the KS108, and I wonder if it is really necessary to use this old display.
On the market, at very low prices, you have color displays (touch or not) with very rich libraries allowing the rotation of images and or texts.
In the forum "Share your work" you have many examples.
JP |
Because this type of Display is enough for my Project.
I also will ask if some Statements in BASCOM exist to rotate a Variable.
Like:
Code: |
...
Dim Y as Byte
...
LCDAT 1,1, Y |
and Rotate it on the Display... ?
Maybe kinda like this:
Code: | LCDAT 1,1,Y,90
LCDAT 1,1,Y,180 |
Regards |
|
Back to top |
|
|
AdrianJ
Joined: 16 Jan 2006 Posts: 2483 Location: Queensland
|
Posted: Thu Apr 11, 2019 11:59 pm Post subject: |
|
|
I think in the Help for LCDAT you will find that that construction does not exist.
I wrote something slightly similar for the SED122*32 display, but allowing to swap the image either left-to-right or up-down. Just a matter of adding appropriate code to that display library. You could do the same for your display. I could post the code if you wanted, but those two displays are so different that I doubt it will help much.
But I tend to agree with Duval, you could probably find a better, cheaper and much more powerful display to do the job.
My impression now is that the time of adding simple displays to low power processors, and trying to do anything more than text or trivial graphics is over. Use something like an Android phone with its very powerful graphics cababilities built in, and easy to create almost any conceivable display with a few lines of Java code, then use all the time you saved to do a really good implementation on the front-end processing, the bit between your sensors and inputs, and the processing of that data to output. You can still choose to use an AVR for that, just pass the result to the phone via something like Bluetooth for display. _________________ Adrian Jansen
Computer language is a framework for creativity |
|
Back to top |
|
|
Duval JP
Joined: 22 Jun 2004 Posts: 1161 Location: France
|
Posted: Fri Apr 12, 2019 8:55 am Post subject: |
|
|
Hi
in my opinion, LCDAT is an instruction specific to the libraries created by Mrshilov ? . It is not a Bascom instruction
JP _________________ pleasure to learn, to teach, to create |
|
Back to top |
|
|
MichaelB.
Joined: 04 May 2017 Posts: 58
|
Posted: Fri Apr 12, 2019 8:56 am Post subject: |
|
|
AdrianJ wrote: | I think in the Help for LCDAT you will find that that construction does not exist.
I wrote something slightly similar for the SED122*32 display, but allowing to swap the image either left-to-right or up-down. Just a matter of adding appropriate code to that display library. You could do the same for your display. I could post the code if you wanted, but those two displays are so different that I doubt it will help much.
But I tend to agree with Duval, you could probably find a better, cheaper and much more powerful display to do the job.
My impression now is that the time of adding simple displays to low power processors, and trying to do anything more than text or trivial graphics is over. Use something like an Android phone with its very powerful graphics cababilities built in, and easy to create almost any conceivable display with a few lines of Java code, then use all the time you saved to do a really good implementation on the front-end processing, the bit between your sensors and inputs, and the processing of that data to output. You can still choose to use an AVR for that, just pass the result to the phone via something like Bluetooth for display. |
Thanks for the Answer.
I know it would be better to write an APP for a Smatphone.
But a Smartphone with his Blutooth dont have the ability of a 433Mhz RF Module.
What i build is , so to speak, a Smartphone with a 8x8 Font , a 128x64 Display with Touchscreen, Acceleration Sensor for Tilt and Sprite Rotate, and a 433Mhz RF Module.
It all Works very fine.
Regards |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5914 Location: Holland
|
Posted: Fri Apr 12, 2019 9:14 am Post subject: |
|
|
LCDAT is really a BASCOM statement.
The Q is : do you need to rotate dynamic or static?
for static you could use the original bmp and rotate and save it.
dynamic is something else. when you have sufficient memory you could read the memory, then write it back in the right order.
the problem is that these pixels are combined into bytes. So 8 first dots are 1 byte.
Some displays have a rotate option built in.
For this old lcd i think making/using an separate rotated bgf is the best option.
otherwise i would recommend to use a newer lcd that supports rotating. _________________ Mark |
|
Back to top |
|
|
MichaelB.
Joined: 04 May 2017 Posts: 58
|
Posted: Fri Apr 12, 2019 10:03 am Post subject: |
|
|
albertsm wrote: | LCDAT is really a BASCOM statement.
The Q is : do you need to rotate dynamic or static?
for static you could use the original bmp and rotate and save it.
dynamic is something else. when you have sufficient memory you could read the memory, then write it back in the right order.
the problem is that these pixels are combined into bytes. So 8 first dots are 1 byte.
Some displays have a rotate option built in.
For this old lcd i think making/using an separate rotated bgf is the best option.
otherwise i would recommend to use a newer lcd that supports rotating. |
Edit: The Variable have to be a Live Update, like showing the Speed, Temperature or ADC Meassure for example...
I allready make .bgf Files for , for example a "2", in 90° and 180°. for Rotaiton.
But when i want to Display a Variable Number of 1234 for example, i have to make 4 Bytes, 4 Case Select, a ton of Code to Display a Set of 4 .bgf Files, and a Pixelset if it is in some cases only a Variable Number of 234...
Regards
Last edited by MichaelB. on Fri Apr 12, 2019 10:25 am; edited 1 time in total |
|
Back to top |
|
|
Duval JP
Joined: 22 Jun 2004 Posts: 1161 Location: France
|
|
Back to top |
|
|
kimmi
Joined: 24 Feb 2006 Posts: 1922 Location: Denmark
|
Posted: Sat Apr 13, 2019 1:20 am Post subject: |
|
|
try forum search : Best way to make a speedometer for an ATV
OR
If Graphic fonts is an option with Rotation
look at evert dekker web site
Link:
https://evertdekker.com/?p=359 _________________ / Kim |
|
Back to top |
|
|
AdrianJ
Joined: 16 Jan 2006 Posts: 2483 Location: Queensland
|
Posted: Sat Apr 13, 2019 5:08 am Post subject: |
|
|
Quote: | I know it would be better to write an APP for a Smatphone.
But a Smartphone with his Blutooth dont have the ability of a 433Mhz RF Module. |
I think you misunderstand what I mean.
By all means have whatever hardware you want built around an AVR. Then instead of sending the data from that to a display, send it via Bluetooth serial and receive it with a smartphone where you do all the graphic stuff. You will of course have to add some commands to the serial stream to tell the phone how you want to rotate the display etc.
I know it seems like gross overkill to use a smartphone just for that, with all the processor power you have there, but they are cheap, and easy to transport the app to another different one when you need to, unlike graphics displays, which are a major job to program for when either the one you use goes out of production, or you want to add more capability. _________________ Adrian Jansen
Computer language is a framework for creativity |
|
Back to top |
|
|
MichaelB.
Joined: 04 May 2017 Posts: 58
|
Posted: Sat Apr 13, 2019 7:30 am Post subject: |
|
|
This Looks pretty neat )) I Investigate it. |
|
Back to top |
|
|
MichaelB.
Joined: 04 May 2017 Posts: 58
|
Posted: Sat Apr 13, 2019 7:46 am Post subject: |
|
|
AdrianJ wrote: | Quote: | I know it would be better to write an APP for a Smatphone.
But a Smartphone with his Blutooth dont have the ability of a 433Mhz RF Module. |
I think you misunderstand what I mean.
By all means have whatever hardware you want built around an AVR. Then instead of sending the data from that to a display, send it via Bluetooth serial and receive it with a smartphone where you do all the graphic stuff. You will of course have to add some commands to the serial stream to tell the phone how you want to rotate the display etc.
I know it seems like gross overkill to use a smartphone just for that, with all the processor power you have there, but they are cheap, and easy to transport the app to another different one when you need to, unlike graphics displays, which are a major job to program for when either the one you use goes out of production, or you want to add more capability. |
First of , its not a Phone. It looks like a Smartphone, But it is just a Smart Handheld device.
Quote: | have to add some commands to the serial stream to tell the phone how you want to rotate the display |
No.
I Call it "Process Corretion". All Sending or Recieving Data coming in Standard direction 0°, no Extra data. The my Smart Handheld Device Process the Angle it self with a Acceleration sensor, and registed if the device is 0°, 90° or 270° Twisted.
Regards |
|
Back to top |
|
|
MWS
Joined: 22 Aug 2009 Posts: 2262
|
Posted: Sat Apr 13, 2019 10:23 am Post subject: |
|
|
MichaelB. wrote: | ...and registed if the device is 0°, 90° or 270° Twisted. |
How in case of 90/270 degrees rotation would it be possible to project an image of 128 x 64 pixels onto a screen of 64 x 128 pixels?
Technically, scaling without aspect ratio would be feasible, but...
If not the controller would be too small for that.
If not the display would be to coarse for that.
If not the viewer of that thing would not getting sick by watching the distorted result.
Quote: | ...it is just a Smart Handheld device |
I would not concentrate on optical gadgets, but more on the 'core smartness' of the device.
As you seem to have missed Bascom's help, which btw. is pretty good, and commands are extensively described, I wonder how smart the device will be, if the maker of same device did not find out there is no rotate command for images and seems to posses little understanding about the hurdles of image processing.
Maybe it would advance your project if you describe what you want to do and ask for ideas to achieve your goal, instead of holding on to concepts which won't work out. |
|
Back to top |
|
|
six1
Joined: 27 Feb 2009 Posts: 553
|
Posted: Sat Apr 13, 2019 11:35 am Post subject: |
|
|
Quote: | If not the viewer of that thing would not getting sick by watching the distorted result. |
...that will look like the product of an epileptic chicken having a seizure on a bad day and, that is on a good day! _________________ For technical reasons, the signature is on the back of this message. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum
|
|