Made some changes to support a different display#5
Open
soharddbwarez wants to merge 6 commits intoGadgetReboot:masterfrom
Open
Made some changes to support a different display#5soharddbwarez wants to merge 6 commits intoGadgetReboot:masterfrom
soharddbwarez wants to merge 6 commits intoGadgetReboot:masterfrom
Conversation
I'm adding my code to the project specifically for: Using the ASAIR AM2302 (DHT22) Temp/Humidity sensor with a Velleman VMA412 2.8" 240x320 resistive touch screen Draws a thermometer bulb graphic with two buttons for you to choose to display the temperature in degree Celsius or Fahrenheit and shows humidity on an analog meter needle display. Turns out that I had to make a lot of changes to the sketch made by GadgetReboot to make it usable on my display the only thing that I have in common is that analog pin 5 isn't used on my shield also, changing it to a digital pin number 19 makes it usable for the sensor... However that's about it, my calibration is completely different in pin usage, the most outer touch values and usable pixels. Therefore I had to rewrite pretty much the whole sketch because for me it's completely unusable as is. It's not perfect yet but at least I managed to get the proportions better so now it starts to fit on the screen, I still need to figure out a couple things because I don't really know what I'm doing so I have to learn by changing one thing, then upload the sketch to see what changed which is a lot of work and takes a long time but my added sketch will be usable for anyone with a similar display that I'm using.
Better commented out what I changed, kept most of the old values for reference in the comment sections.
All graphical stuff except the analog needle position is now scaled down properly so it fits nicely on the screen, buttons work and are given a new position. The numerical box is now also changed to fit the screen and I now have the correct position for the header text, the temperature and humidity values.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I had to make quite significant changes to the your code to get it working with my smaller LCD display.
At first it looked like you made the graphics scalable with minimal changes but that wasn't the case so I had to figure out first what each value was at all the various places and what it does on the display, then change one little thing at a time, upload the sketch and look what changed, instead of being able to use scaling I had to resort to completely reverse engineer your code because you didn't comment in which value does what at the specific places.
I made it so far that the graphics fit on my smaller display but I eventually gave up with the analog humidity meter at the top of the display because to figure that out I had to put too much of my time into this project if I want it to show up perfectly centered and scaled to my display.
So I got it almost perfect and I can live with the needle not perfectly aligned and centered and the scale of the analog half circled bar just a bit off.
Got it running this way for a few years now so you might want to add my code to yours so there's support for a different and smaller display which is 240x320 pixels.
Best regards.