|
SHROOMSISAY01
Mr. Shrooms



Registered: 01/22/17
Posts: 3,849
Loc: Virginia, USA
Last seen: 2 days, 12 hours
|
!!Arduino programer needed!!
#26203942 - 09/23/19 01:21 AM (4 years, 4 months ago) |
|
|
So I have been using a willhi humidity sensor to keep the humidity correct in my room. The sensors do not last long in them. Just like any other controller out there.
I bought this sensor for Arduino. Hoping it will last longer...
https://www.amazon.com/gp/product/B07F9X9Q37/ref=ppx_yo_dt_b_asin_title_o03_s00?ie=UTF8&psc=1
I thought it was going to be easier to program than it actually is. Well, the humidity sensor was easy. The touch screen is however is above what I am capable of doing at the moment. Some help would be greatly appreciated.
I can not find anything on how to create buttons on a touch screen or how to make pages that said buttons will take you to.
I just need direction not someone to do it for me. But that would be ok too.
Edited by SHROOMSISAY01 (09/23/19 02:03 AM)
|
solarity
mm... my favourite food



Registered: 03/31/09
Posts: 1,590
Loc: UK
|
|
Sure I have mentioned this but if you wrap the humidity sensors in filtration material (I used paint booth filter) then that lets the humidity through but keeps out the water drops which is what kills them. https://www.ebay.co.uk/itm/1mx5mx20mm-Thick-Paint-Shop-Car-Spray-Booth-Air-Filter-Material-Extraction-Panel/263653064365?hash=item3d62f27ead:m:m_kmwM_LZuBnfNNIlSOC2EA Mine lasted 5 years like that, vs 6 month uncovered. Though when one did die I just had it on a timer for 15 mins every 4 hours and that worked just as well.
I wrote a large program for an automated steriliser/pasteuriser mixer using Ardublock which is much easier than learning C++ http://blog.ardublock.com/ unfortunately been undeveloped for a while but still works great.
-------------------- Commercial exotics farmer for 8 years - now sold up!
|
bogdancev
Stranger
Registered: 09/01/17
Posts: 313
Last seen: 2 years, 7 months
|
Re: !!Arduino programer needed!! [Re: solarity]
#26205912 - 09/24/19 06:34 AM (4 years, 4 months ago) |
|
|
Hi @SHROOMSISAY01
Can you specify which screen and board you use? Because it is really impossible to answer your question without those.
The other idea would be using non-touch displays with some buttons. You can assign actions to buttons dynamically depending on which screen you are.
|
SHROOMSISAY01
Mr. Shrooms



Registered: 01/22/17
Posts: 3,849
Loc: Virginia, USA
Last seen: 2 days, 12 hours
|
Re: !!Arduino programer needed!! [Re: bogdancev]
#26207458 - 09/24/19 08:28 PM (4 years, 4 months ago) |
|
|
Quote:
bogdancev said: Hi @SHROOMSISAY01
Can you specify which screen and board you use? Because it is really impossible to answer your question without those.
The other idea would be using non-touch displays with some buttons. You can assign actions to buttons dynamically depending on which screen you are.

The screen I have is... https://www.amazon.com/gp/product/B0722DPHN6/ref=ppx_yo_dt_b_asin_title_o04_s01?ie=UTF8&psc=1
I have these boards... https://www.amazon.com/gp/product/B01H4ZDYCE/ref=ppx_yo_dt_b_asin_title_o04_s01?ie=UTF8&psc=1
https://www.amazon.com/gp/product/B01EWOE0UU/ref=ppx_yo_dt_b_asin_title_o01_s00?ie=UTF8&psc=1
I think I may have gotten in over my head on this one. I want to learn to program Arduino. I watched 8 hours of Arduino programming yesterday and I learnt a lot but I am not even close to programing this board to do what I need it to do.
|
SHROOMSISAY01
Mr. Shrooms



Registered: 01/22/17
Posts: 3,849
Loc: Virginia, USA
Last seen: 2 days, 12 hours
|
Re: !!Arduino programer needed!! [Re: solarity]
#26207512 - 09/24/19 09:05 PM (4 years, 4 months ago) |
|
|
Quote:
solarity said: Sure I have mentioned this but if you wrap the humidity sensors in filtration material (I used paint booth filter) then that lets the humidity through but keeps out the water drops which is what kills them. https://www.ebay.co.uk/itm/1mx5mx20mm-Thick-Paint-Shop-Car-Spray-Booth-Air-Filter-Material-Extraction-Panel/263653064365?hash=item3d62f27ead:m:m_kmwM_LZuBnfNNIlSOC2EA Mine lasted 5 years like that, vs 6 month uncovered. Though when one did die I just had it on a timer for 15 mins every 4 hours and that worked just as well.
I wrote a large program for an automated steriliser/pasteuriser mixer using Ardublock which is much easier than learning C++ http://blog.ardublock.com/ unfortunately been undeveloped for a while but still works great.
I appreciate your help!! I tried using polyfill over the sensor. I can't remember why I did not like it. If I don't get some help here it looks like this will be the end of the road for me. I spent the money on all this stuff and now I am stuck.
|
bogdancev
Stranger
Registered: 09/01/17
Posts: 313
Last seen: 2 years, 7 months
|
|
Hi @SHROOMSISAY01
There is a complete sketch in section "Arduino Interface Sketch" at the bottom of the page with your monitor and your board.
Can you upload it and see if three buttons are drawn? Don't worry about hooking up LEDs for now, just see if buttons are drawn.
Under the sketch there are links to 2 libraries on GitHub to work with your display. I assume you already know how to install those in Arduino IDE?
|
SHROOMSISAY01
Mr. Shrooms



Registered: 01/22/17
Posts: 3,849
Loc: Virginia, USA
Last seen: 2 days, 12 hours
|
Re: !!Arduino programer needed!! [Re: bogdancev]
#26208153 - 09/25/19 09:46 AM (4 years, 4 months ago) |
|
|
I am sorry I am very new to Arduino. I am very excited to learn though. I have been spending every spare minute trying to understand it.
When I try and compile it get this error message... 'Adafruit_GFX_Button' does not name a type; did you mean 'Adafruit_GFX'?
Thank you for your help by the way. You don't know how much this means to me and how much I appreciate your help. I had given up on getting any help.
|
bogdancev
Stranger
Registered: 09/01/17
Posts: 313
Last seen: 2 years, 7 months
|
|
Hi @SHROOMSISAY01
(sorry for a link to a video about Arduino, I meant another video)
I managed to compile it: 1. Adafruit_GFX - Go to Sketch -> Include Library -> Manage Libraries... - In search box type: Adafruit_GFX, it should find it first in the list. On the left there is a drop-down "Select version", select version 1.5.3 IMPORTANT!!! and install. 2. Adafruit_TFTLCD - Go to GitHub and download zip file (TFTLCD-Library-master.zip) - Go to Sketch -> Include Library -> Add .ZIP Library... - In file explorer navigate to downloaded zip file, select and install it. 3. TouchScreen.h - Go to Sketch -> Include Library -> Manage Libraries... - In search box type: TouchScreen, it will find it first in the list. Install version 1.0.3. 4. MCUFRIEND_kbv.h - Go to Sketch -> Include Library -> Manage Libraries... - In search box type: MCUFRIEND_kbv, it will find it first in the list. Install version 2.9.7 IMPORTANT!!!
After this try to compile (click "verify" button that looks like check-mark on the top left). Mine compiles and gives no errors. Also in Tools -> Board: select your Mega or Uno board depending on which one you use at the moment.
Hope it works!
|
SHROOMSISAY01
Mr. Shrooms



Registered: 01/22/17
Posts: 3,849
Loc: Virginia, USA
Last seen: 2 days, 12 hours
|
Re: !!Arduino programer needed!! [Re: bogdancev]
#26208702 - 09/25/19 01:54 PM (4 years, 4 months ago) |
|
|
I managed to compile it: 1. Adafruit_GFX - Go to Sketch -> Include Library -> Manage Libraries... - In search box type: Adafruit_GFX, it should find it first in the list. On the left there is a drop-down "Select version", select version 1.5.3 IMPORTANT!!! and install.
That version does not exist in the drop-down menu...

so I installed 1.0.3 That did not work. Then I went to the 1st one that actually had 1.5.3 in the drop-down menu and that did not work. Everything else you told me to install I already had installed from working with the TFT before you started helping me.
This is the error I am getting so we are clear...
|
bogdancev
Stranger
Registered: 09/01/17
Posts: 313
Last seen: 2 years, 7 months
|
|
On your screenshot the library is second in a list. You are selecting Adafruit DotMatrix. You need the next one: Adafruit GFX
|
SHROOMSISAY01
Mr. Shrooms



Registered: 01/22/17
Posts: 3,849
Loc: Virginia, USA
Last seen: 2 days, 12 hours
|
Re: !!Arduino programer needed!! [Re: bogdancev]
#26208799 - 09/25/19 02:45 PM (4 years, 4 months ago) |
|
|
Yea they are both installed but still no luck
|
bogdancev
Stranger
Registered: 09/01/17
Posts: 313
Last seen: 2 years, 7 months
|
|
Well, what does it do? What is the error message?
|
SHROOMSISAY01
Mr. Shrooms



Registered: 01/22/17
Posts: 3,849
Loc: Virginia, USA
Last seen: 2 days, 12 hours
|
Re: !!Arduino programer needed!! [Re: bogdancev]
#26208812 - 09/25/19 02:51 PM (4 years, 4 months ago) |
|
|
same message...
|
bogdancev
Stranger
Registered: 09/01/17
Posts: 313
Last seen: 2 years, 7 months
|
|
This is my screenshot:

So I know it works. I think we should start checking versions of those 3 libraries. Could you do 3 screenshots for:
- Adafruit_GFX
- TouchScreen
- MCUFRIEND_kbv
from library manager window.
|
SHROOMSISAY01
Mr. Shrooms



Registered: 01/22/17
Posts: 3,849
Loc: Virginia, USA
Last seen: 2 days, 12 hours
|
Re: !!Arduino programer needed!! [Re: bogdancev]
#26208854 - 09/25/19 03:13 PM (4 years, 4 months ago) |
|
|
I am uninstalling Arduino IDE and reinstalling to see if I have messed something up.
|
bogdancev
Stranger
Registered: 09/01/17
Posts: 313
Last seen: 2 years, 7 months
|
|
Also I tried to specify Uno and it did not compile. Only Mega compiles. I guess Uno does not have enough memory or other resources to hold those libraries. So use Mega board for now.
|
SHROOMSISAY01
Mr. Shrooms



Registered: 01/22/17
Posts: 3,849
Loc: Virginia, USA
Last seen: 2 days, 12 hours
|
Re: !!Arduino programer needed!! [Re: bogdancev]
#26208889 - 09/25/19 03:27 PM (4 years, 4 months ago) |
|
|
Yea I made sure I used the mega. I am reinstalling the libraries now I will see if this helps. I don't understand. If yours compiles mine should do the same. I have to be doing something wrong!
|
SHROOMSISAY01
Mr. Shrooms



Registered: 01/22/17
Posts: 3,849
Loc: Virginia, USA
Last seen: 2 days, 12 hours
|
|
!!YEA!! I got it working!!...
|
bogdancev
Stranger
Registered: 09/01/17
Posts: 313
Last seen: 2 years, 7 months
|
|
Nice.
Now try to change program so that instead of lighting up LEDs it would change the color of the button that is being touched or something in that sense.
Basically you need to test touch and ability to draw geometrical shapes. Sensor reading you already have.
And don't update those libraries that I marked as IMPORTANT, because it will break compatibility with other libraries.
Edited by bogdancev (09/25/19 04:00 PM)
|
SHROOMSISAY01
Mr. Shrooms



Registered: 01/22/17
Posts: 3,849
Loc: Virginia, USA
Last seen: 2 days, 12 hours
|
Re: !!Arduino programer needed!! [Re: bogdancev]
#26208973 - 09/25/19 04:02 PM (4 years, 4 months ago) |
|
|
Sorry, I am not the sharpest knife in the drawer sometimes! I only noticed what I had done wrong when I started installing the libraries again. I had already installed a couple of the libraries so I skipped over them where you told me to install them. I guess I should have paid more attention to where you said...
4. MCUFRIEND_kbv.h -Install version 2.9.7 IMPORTANT!!!
But I did not think it was important. I thought you accidentally put the important in there in all red. LOL. I just didn't think about a different version because it was working for what I was trying. That was a GOOD lesson!
|
|